diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2010-01-17 13:31:25 -0800 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2010-01-17 13:31:25 -0800 |
commit | 7902c120cb0ee06180ce91c0d668fddecaaa041a (patch) | |
tree | 3cbc91d9e8e0702d5bb693fc67b77e9e6e6cad13 | |
parent | 4d0bbcb62adfaa4d29657ee93dfbd7fec2bd51f5 (diff) | |
download | emacs-7902c120cb0ee06180ce91c0d668fddecaaa041a.tar.gz |
(with-vc-properties): Deal with directory arguments. (Bug#5298)
-rw-r--r-- | lisp/ChangeLog | 2 | ||||
-rw-r--r-- | lisp/vc.el | 14 |
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 @@ 2010-01-17 Dan Nicolaescu <dann@ics.uci.edu> + * vc.el (with-vc-properties): Deal with directory arguments. (Bug#5298) + * vc-dir.el (vc-dir-resynch-file): Update the vc-dir header when resyncing a directory. 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.") (defmacro with-vc-properties (files form settings) "Execute FORM, then maybe set per-file properties for FILES. +If any of FILES is actually a directory, then do the same for all +buffers for files in that directory. SETTINGS is an association list of property/value pairs. After executing FORM, set those properties from SETTINGS that have not yet been updated to their corresponding values." (declare (debug t)) - `(let ((vc-touched-properties (list t))) - ,form + `(let ((vc-touched-properties (list t)) + (flist nil)) (dolist (file ,files) + (if (file-directory-p file) + (dolist (buffer (buffer-list)) + (let ((fname (buffer-file-name buffer))) + (when (and fname (vc-string-prefix-p file fname)) + (push fname flist)))) + (push file flist))) + ,form + (dolist (file flist) (dolist (setting ,settings) (let ((property (car setting))) (unless (memq property vc-touched-properties) |