[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/dired-aux.el,v
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/dired-aux.el,v |
Date: |
Thu, 31 Jul 2008 17:17:36 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Juri Linkov <jurta> 08/07/31 17:17:35
Index: dired-aux.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/dired-aux.el,v
retrieving revision 1.178
retrieving revision 1.179
diff -u -b -r1.178 -r1.179
--- dired-aux.el 31 Jul 2008 16:50:54 -0000 1.178
+++ dired-aux.el 31 Jul 2008 17:17:35 -0000 1.179
@@ -255,9 +255,20 @@
Symbolic modes like `g+w' are allowed."
(interactive "P")
(let* ((files (dired-get-marked-files t arg))
+ (modestr (and (stringp (car files))
+ (nth 8 (file-attributes (car files)))))
+ (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)))))
(modes (dired-mark-read-string
"Change mode of %s to: " nil
- 'chmod arg files))
+ 'chmod arg files default))
(num-modes (if (string-match "^[0-7]+" modes)
(string-to-number modes 8))))
(dolist (file files)
@@ -358,14 +369,14 @@
;; If the current file was used, the list has but one element and ARG
;; does not matter. (It is non-nil, non-integer in that case, namely '(4)).
-(defun dired-mark-read-string (prompt initial op-symbol arg files)
- ;; PROMPT for a string, with INITIAL input.
+(defun dired-mark-read-string (prompt initial op-symbol arg files &optional
default)
+ ;; PROMPT for a string, with INITIAL input and DEFAULT value.
;; Other args are used to give user feedback and pop-up:
;; OP-SYMBOL of command, prefix ARG, marked FILES.
(dired-mark-pop-up
nil op-symbol files
(function read-string)
- (format prompt (dired-mark-prompt arg files)) initial))
+ (format prompt (dired-mark-prompt arg files)) initial nil default))
;;; Cleaning a directory: flagging some backups for deletion.
- [Emacs-diffs] Changes to emacs/lisp/dired-aux.el,v, Chong Yidong, 2008/07/24
- [Emacs-diffs] Changes to emacs/lisp/dired-aux.el,v, Chong Yidong, 2008/07/24
- [Emacs-diffs] Changes to emacs/lisp/dired-aux.el,v, Juri Linkov, 2008/07/28
- [Emacs-diffs] Changes to emacs/lisp/dired-aux.el,v, Juri Linkov, 2008/07/29
- [Emacs-diffs] Changes to emacs/lisp/dired-aux.el,v, Juri Linkov, 2008/07/29
- [Emacs-diffs] Changes to emacs/lisp/dired-aux.el,v, Juri Linkov, 2008/07/30
- [Emacs-diffs] Changes to emacs/lisp/dired-aux.el,v, Dan Nicolaescu, 2008/07/31
- [Emacs-diffs] Changes to emacs/lisp/dired-aux.el,v, Juri Linkov, 2008/07/31
- [Emacs-diffs] Changes to emacs/lisp/dired-aux.el,v,
Juri Linkov <=