[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/files.el,v
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/files.el,v |
Date: |
Thu, 31 Jul 2008 17:18:09 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Juri Linkov <jurta> 08/07/31 17:18:08
Index: files.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.989
retrieving revision 1.990
diff -u -b -r1.989 -r1.990
--- files.el 31 Jul 2008 05:33:43 -0000 1.989
+++ files.el 31 Jul 2008 17:18:06 -0000 1.990
@@ -5765,7 +5765,19 @@
ORIG-FILE is the original file of which modes will be change."
(let* ((modes (or (if orig-file (file-modes orig-file) 0)
(error "File not found")))
- (value (read-string (or prompt "File modes (octal or symbolic): "))))
+ (modestr (and (stringp orig-file)
+ (nth 8 (file-attributes orig-file))))
+ (default
+ (and (stringp modestr)
+ (string-match "^.\\(...\\)\\(...\\)\\(...\\)$" modestr)
+ (replace-regexp-in-string
+ "-" ""
+ (format "u=%s,g=%s,o=%s"
+ (match-string 1 modestr)
+ (match-string 2 modestr)
+ (match-string 3 modestr)))))
+ (value (read-string (or prompt "File modes (octal or symbolic): ")
+ nil nil default)))
(save-match-data
(if (string-match "^[0-7]+" value)
(string-to-number value 8)
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Jason Rumney, 2008/07/02
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Jason Rumney, 2008/07/11
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Chong Yidong, 2008/07/30
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Dan Nicolaescu, 2008/07/31
- [Emacs-diffs] Changes to emacs/lisp/files.el,v,
Juri Linkov <=
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Chong Yidong, 2008/07/31
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Juanma Barranquero, 2008/07/31