emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/dired-aux.el,v


From: Michael Cadilhac
Subject: [Emacs-diffs] Changes to emacs/lisp/dired-aux.el,v
Date: Mon, 10 Sep 2007 09:58:16 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Cadilhac <cadilhac>     07/09/10 09:58:16

Index: dired-aux.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/dired-aux.el,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -b -r1.154 -r1.155
--- dired-aux.el        13 Aug 2007 13:41:07 -0000      1.154
+++ dired-aux.el        10 Sep 2007 09:58:16 -0000      1.155
@@ -253,9 +253,20 @@
 ;;;###autoload
 (defun dired-do-chmod (&optional arg)
   "Change the mode of the marked (or next ARG) files.
-This calls chmod, thus symbolic modes like `g+w' are allowed."
+Symbolic 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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]