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
822b17d3
Commit
822b17d3
authored
Sep 10, 2007
by
Michaël Cadilhac
Browse files
(dired-do-chmod): Change to use the built-in `set-file-modes' and the
symbolic mode parsing functions.
parent
f664fee9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
lisp/ChangeLog
lisp/ChangeLog
+3
-0
lisp/dired-aux.el
lisp/dired-aux.el
+13
-2
No files found.
lisp/ChangeLog
View file @
822b17d3
...
...
@@ -8,6 +8,9 @@
(read-file-modes): New. Read either an octal value of a file mode or a
symbolic value, and return its numeric value.
* dired-aux.el (dired-do-chmod): Change to use the built-in
`set-file-modes' and the previous symbolic mode parsing functions.
2007-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
* textmodes/texinfo.el: Remove spurious * in docstrings.
...
...
lisp/dired-aux.el
View file @
822b17d3
...
...
@@ -253,9 +253,20 @@ List has a form of (file-name full-file-name (attribute-list))"
;;;###autoload
(
defun
dired-do-chmod
(
&optional
arg
)
"Change the mode of the marked (or next ARG) files.
This calls chmod, thus s
ymbolic modes like `g+w' are allowed."
S
ymbolic modes like `g+w' are allowed."
(
interactive
"P"
)
(
dired-do-chxxx
"Mode"
dired-chmod-program
'chmod
arg
))
(
let*
((
files
(
dired-get-marked-files
t
arg
))
(
modes
(
dired-mark-read-string
"Change mode of %s to: "
nil
'chmod
arg
files
))
(
num-modes
(
if
(
string-match
"^[0-7]+"
modes
)
(
string-to-number
modes
8
))))
(
dolist
(
file
files
)
(
set-file-modes
file
(
if
num-modes
num-modes
(
file-modes-symbolic-to-number
modes
(
file-modes
file
)))))
(
dired-do-redisplay
arg
)))
;;;###autoload
(
defun
dired-do-chgrp
(
&optional
arg
)
...
...
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