aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2010-01-17 13:31:25 -0800
committerDan Nicolaescu2010-01-17 13:31:25 -0800
commit7902c120cb0ee06180ce91c0d668fddecaaa041a (patch)
tree3cbc91d9e8e0702d5bb693fc67b77e9e6e6cad13
parent4d0bbcb62adfaa4d29657ee93dfbd7fec2bd51f5 (diff)
downloademacs-7902c120cb0ee06180ce91c0d668fddecaaa041a.tar.gz
emacs-7902c120cb0ee06180ce91c0d668fddecaaa041a.zip
(with-vc-properties): Deal with directory arguments. (Bug#5298)
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/vc.el14
2 files changed, 14 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fb14b30ac28..d3b9a27a092 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
12010-01-17 Dan Nicolaescu <dann@ics.uci.edu> 12010-01-17 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 * vc.el (with-vc-properties): Deal with directory arguments. (Bug#5298)
4
3 * vc-dir.el (vc-dir-resynch-file): Update the vc-dir header when 5 * vc-dir.el (vc-dir-resynch-file): Update the vc-dir header when
4 resyncing a directory. 6 resyncing a directory.
5 7
diff --git a/lisp/vc.el b/lisp/vc.el
index 3a0cf804e26..2ca36ef4e01 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -791,13 +791,23 @@ in their implementation of vc-BACKEND-diff.")
791 791
792(defmacro with-vc-properties (files form settings) 792(defmacro with-vc-properties (files form settings)
793 "Execute FORM, then maybe set per-file properties for FILES. 793 "Execute FORM, then maybe set per-file properties for FILES.
794If any of FILES is actually a directory, then do the same for all
795buffers for files in that directory.
794SETTINGS is an association list of property/value pairs. After 796SETTINGS is an association list of property/value pairs. After
795executing FORM, set those properties from SETTINGS that have not yet 797executing FORM, set those properties from SETTINGS that have not yet
796been updated to their corresponding values." 798been updated to their corresponding values."
797 (declare (debug t)) 799 (declare (debug t))
798 `(let ((vc-touched-properties (list t))) 800 `(let ((vc-touched-properties (list t))
799 ,form 801 (flist nil))
800 (dolist (file ,files) 802 (dolist (file ,files)
803 (if (file-directory-p file)
804 (dolist (buffer (buffer-list))
805 (let ((fname (buffer-file-name buffer)))
806 (when (and fname (vc-string-prefix-p file fname))
807 (push fname flist))))
808 (push file flist)))
809 ,form
810 (dolist (file flist)
801 (dolist (setting ,settings) 811 (dolist (setting ,settings)
802 (let ((property (car setting))) 812 (let ((property (car setting)))
803 (unless (memq property vc-touched-properties) 813 (unless (memq property vc-touched-properties)