##// END OF EJS Templates
mercurial.el: move defmacro of hg-do-across-repo before use...
NIIMI Satoshi -
r4412:189a8ca5 default
parent child Browse files
Show More
@@ -317,6 +317,18 b' If the command does not exit with a zero'
317 (car res))
317 (car res))
318 (cdr res))))
318 (cdr res))))
319
319
320 (defmacro hg-do-across-repo (path &rest body)
321 (let ((root-name (gensym "root-"))
322 (buf-name (gensym "buf-")))
323 `(let ((,root-name (hg-root ,path)))
324 (save-excursion
325 (dolist (,buf-name (buffer-list))
326 (set-buffer ,buf-name)
327 (when (and hg-status (equal (hg-root buffer-file-name) ,root-name))
328 ,@body))))))
329
330 (put 'hg-do-across-repo 'lisp-indent-function 1)
331
320 (defun hg-sync-buffers (path)
332 (defun hg-sync-buffers (path)
321 "Sync buffers visiting PATH with their on-disk copies.
333 "Sync buffers visiting PATH with their on-disk copies.
322 If PATH is not being visited, but is under the repository root, sync
334 If PATH is not being visited, but is under the repository root, sync
@@ -539,18 +551,6 b' directory names from the file system. W'
539 (set-buffer buf)
551 (set-buffer buf)
540 (hg-mode-line-internal status parents)))))))
552 (hg-mode-line-internal status parents)))))))
541
553
542 (defmacro hg-do-across-repo (path &rest body)
543 (let ((root-name (gensym "root-"))
544 (buf-name (gensym "buf-")))
545 `(let ((,root-name (hg-root ,path)))
546 (save-excursion
547 (dolist (,buf-name (buffer-list))
548 (set-buffer ,buf-name)
549 (when (and hg-status (equal (hg-root buffer-file-name) ,root-name))
550 ,@body))))))
551
552 (put 'hg-do-across-repo 'lisp-indent-function 1)
553
554
554
555 ;;; View mode bits.
555 ;;; View mode bits.
556
556
General Comments 0
You need to be logged in to leave comments. Login now