# HG changeset patch # User NIIMI Satoshi # Date 1178347840 -32400 # Node ID 189a8ca52bfcfc6dacffc970123f2703a3946b36 # Parent 681b681f7f090ce4c49ed8f37181292e112b14a9 mercurial.el: move defmacro of hg-do-across-repo before use Macros must be defined before use to be byte-compiled properly. diff -r 681b681f7f09 -r 189a8ca52bfc contrib/mercurial.el --- 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.