[PATCH 2 of 3] mercurial.el: move defmacro of hg-do-across-repo before use

NIIMI Satoshi sa2c at sa2c.net
Sat May 5 07:24:05 UTC 2007


# HG changeset patch
# User NIIMI Satoshi <sa2c at sa2c.net>
# Date 1178347840 -32400
# Node ID eb698f8affc072d1c9c9005b00003fab8b6bbe79
# Parent  02cc9dfd5d9f912bbfc20c3f62484fd3e6c06a3c
mercurial.el: move defmacro of hg-do-across-repo before use

Macros must be defined before use to be byte-compiled properly.

diff -r 02cc9dfd5d9f -r eb698f8affc0 contrib/mercurial.el
--- a/contrib/mercurial.el	Sat May 05 15:42:35 2007 +0900
+++ b/contrib/mercurial.el	Sat May 05 15:50:40 2007 +0900
@@ -317,6 +317,18 @@ If the command does not exit with a zero
 	       (car res))
       (cdr res))))
 
+(defmacro hg-do-across-repo (path &rest body)
+  (let ((root-name (gensym "root-"))
+	(buf-name (gensym "buf-")))
+    `(let ((,root-name (hg-root ,path)))
+       (save-excursion
+	 (dolist (,buf-name (buffer-list))
+	   (set-buffer ,buf-name)
+	   (when (and hg-status (equal (hg-root buffer-file-name) ,root-name))
+	     , at body))))))
+
+(put 'hg-do-across-repo 'lisp-indent-function 1)
+
 (defun hg-sync-buffers (path)
   "Sync buffers visiting PATH with their on-disk copies.
 If PATH is not being visited, but is under the repository root, sync
@@ -539,18 +551,6 @@ directory names from the file system.  W
 	    (set-buffer buf)
 	    (hg-mode-line-internal status parents)))))))
   
-(defmacro hg-do-across-repo (path &rest body)
-  (let ((root-name (gensym "root-"))
-	(buf-name (gensym "buf-")))
-    `(let ((,root-name (hg-root ,path)))
-       (save-excursion
-	 (dolist (,buf-name (buffer-list))
-	   (set-buffer ,buf-name)
-	   (when (and hg-status (equal (hg-root buffer-file-name) ,root-name))
-	     , at body))))))
-
-(put 'hg-do-across-repo 'lisp-indent-function 1)
-
 
 ;;; View mode bits.
 



More information about the Mercurial-devel mailing list