Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7902c120
Commit
7902c120
authored
Jan 17, 2010
by
Dan Nicolaescu
Browse files
(with-vc-properties): Deal with directory arguments. (Bug#5298)
parent
4d0bbcb6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
lisp/ChangeLog
lisp/ChangeLog
+2
-0
lisp/vc.el
lisp/vc.el
+12
-2
No files found.
lisp/ChangeLog
View file @
7902c120
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.
...
...
lisp/vc.el
View file @
7902c120
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment