aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2015-04-10 03:54:55 +0300
committerDmitry Gutov2015-04-10 03:54:55 +0300
commit0679159c41a0c577cadf6b08f730e00f3c00931c (patch)
tree94e76993fca669e3fdc36cc9dd433cfb8f8e9dee
parentc1daad42c643d71fa022b35512457c9e4fbb8b6d (diff)
downloademacs-0679159c41a0c577cadf6b08f730e00f3c00931c.tar.gz
emacs-0679159c41a0c577cadf6b08f730e00f3c00931c.zip
Use the VC root in `log-edit-listfun'
* lisp/vc/vc-dispatcher.el (vc-log-edit): Use the VC root in `log-edit-listfun'.
-rw-r--r--lisp/vc/vc-dispatcher.el19
1 files changed, 14 insertions, 5 deletions
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index 4f8ec278896..8b3e888f700 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -604,11 +604,20 @@ NOT-URGENT means it is ok to continue if the user says not to save."
604 (or (log-edit-empty-buffer-p) 604 (or (log-edit-empty-buffer-p)
605 (and (local-variable-p 'vc-log-fileset) 605 (and (local-variable-p 'vc-log-fileset)
606 (not (equal vc-log-fileset fileset)))) 606 (not (equal vc-log-fileset fileset))))
607 `((log-edit-listfun . (lambda () 607 `((log-edit-listfun
608 ;; FIXME: Should expand the list 608 . (lambda ()
609 ;; for directories. 609 ;; FIXME: Should expand the list for directories.
610 (mapcar 'file-relative-name 610 ;; Is the above still relevant? If so, it needs a
611 ',fileset))) 611 ;; better explanation. -- dgutov
612 (let ((root (vc-root-dir)))
613 ;; Returns paths relative to the root, so that
614 ;; `log-edit-changelog-insert-entries'
615 ;; substitutes them in correctly later, even when
616 ;; `vc-checkin' was called from a file buffer, or
617 ;; a non-root VC-Dir buffer.
618 (mapcar
619 (lambda (file) (file-relative-name file root))
620 ',fileset))))
612 (log-edit-diff-function . vc-diff) 621 (log-edit-diff-function . vc-diff)
613 (log-edit-vc-backend . ,backend) 622 (log-edit-vc-backend . ,backend)
614 (vc-log-fileset . ,fileset)) 623 (vc-log-fileset . ,fileset))