changeset 4412:189a8ca52bfc

mercurial.el: move defmacro of hg-do-across-repo before use Macros must be defined before use to be byte-compiled properly.
author NIIMI Satoshi <sa2c@sa2c.net>
date Sat, 05 May 2007 15:50:40 +0900
parents 681b681f7f09
children b008deae9910
files contrib/mercurial.el
diffstat 1 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/mercurial.el	Mon May 07 08:42:48 2007 -0700
+++ b/contrib/mercurial.el	Sat May 05 15:50:40 2007 +0900
@@ -317,6 +317,18 @@
 	       (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))
+	     ,@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 @@
 	    (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))
-	     ,@body))))))
-
-(put 'hg-do-across-repo 'lisp-indent-function 1)
-
 
 ;;; View mode bits.