diff options
| -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 @@ | |||
| 1 | 2010-01-17 Dan Nicolaescu <dann@ics.uci.edu> | 1 | 2010-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. |
| 794 | If any of FILES is actually a directory, then do the same for all | ||
| 795 | buffers for files in that directory. | ||
| 794 | SETTINGS is an association list of property/value pairs. After | 796 | SETTINGS is an association list of property/value pairs. After |
| 795 | executing FORM, set those properties from SETTINGS that have not yet | 797 | executing FORM, set those properties from SETTINGS that have not yet |
| 796 | been updated to their corresponding values." | 798 | been 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) |