;;; dired-aux.el --- less commonly used parts of dired
-;; Copyright (C) 1985-1986, 1992, 1994, 1998, 2000-2011
+;; Copyright (C) 1985-1986, 1992, 1994, 1998, 2000-2012
;; Free Software Foundation, Inc.
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>.
(match-string 3 modestr)))))
(modes (dired-mark-read-string
"Change mode of %s to: "
- ;; Insert initial input if there's only one file.
- (unless (cadr files) default)
- 'chmod arg files default))
+ nil 'chmod arg files default))
num-modes)
-
(cond ((equal modes "")
;; We used to treat empty input as DEFAULT, but that is not
;; such a good idea (Bug#9361).
;; Do the operation and record failures.
failures (nconc (apply function (append args pending))
failures)
- ;; Transfer the elemens of PENDING onto PAST
+ ;; Transfer the elements of PENDING onto PAST
;; and clear it out. Now PAST contains the first N files
;; specified (for some N), and FILES contains the rest.
past (nconc past pending)
(dired-run-shell-command (dired-shell-stuff-it command file-list nil))))
(defun dired-mark-read-string (prompt initial op-symbol arg files
- &optional standard-value)
+ &optional default-value)
"Read args for a Dired marked-files command, prompting with PROMPT.
Return the user input (a string).
ARG is normally the prefix argument for the calling command.
FILES should be a list of file names.
-STANDARD-VALUE, if non-nil, should be a \"standard\" value or
-list of such values, available via history commands. Note that
-if the user enters empty input, this function returns the empty
-string, not STANDARD-VALUE."
+DEFAULT-VALUE, if non-nil, should be a \"standard\" value or list
+of such values, available via history commands. Note that if the
+user enters empty input, this function returns the empty string,
+not DEFAULT-VALUE."
(dired-mark-pop-up nil op-symbol files
'read-from-minibuffer
(format prompt (dired-mark-prompt arg files))
- initial nil nil nil standard-value))
+ initial nil nil nil default-value))
\f
;;; Cleaning a directory: flagging some backups for deletion.
(concat (apply 'format prompt args)
(if help-form
(format " [Type yn!q or %s] "
- (key-description
- (char-to-string help-char)))
+ (key-description (vector help-char)))
" [Type y, n, q or !] ")))
(set sym (setq char (read-char-choice prompt char-choices)))
(if (memq char '(?y ?\s ?!)) t)))))
Optional arg MARKER-CHAR as in `dired-create-files'.
Optional arg OP1 is an alternate form for OPERATION if there is
only one file.
-Optional arg HOW-TO determiness how to treat the target.
+Optional arg HOW-TO determines how to treat the target.
If HOW-TO is nil, use `file-directory-p' to determine if the
target is a directory. If so, the marked file(s) are created
inside that directory. Otherwise, the target is a plain file;