summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2011-07-11 22:54:26 -0400
committerChong Yidong <cyd@stupidchicken.com>2011-07-11 22:54:26 -0400
commitf69fd0d2fb66ec97cf315e7ef5b0e6b402822af0 (patch)
treedb948e380bfb1598f790eb7fd004375ea9bc8ea9
parentd988232217c0f545bb87c07dba9afd0e4418c610 (diff)
downloademacs-f69fd0d2fb66ec97cf315e7ef5b0e6b402822af0.tar.gz
Minor Dired doc fixes.
* lisp/dired.el (dired-mark-prompt): * lisp/dired-aux.el (dired-read-shell-command): Doc fix.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/dired-aux.el21
-rw-r--r--lisp/dired.el10
3 files changed, 24 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index af6079ec0eb..c3b33866657 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-12 Chong Yidong <cyd@stupidchicken.com>
+
+ * dired.el (dired-mark-prompt):
+ * dired-aux.el (dired-read-shell-command): Doc fix.
+
2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
* mail/sendmail.el (sendmail-query-once): Use
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 5ab4146383b..3103fbd5a7f 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -514,22 +514,25 @@ to the end of the list of defaults just after the default value."
;; This is an extra function so that you can redefine it, e.g., to use gmhist.
(defun dired-read-shell-command (prompt arg files)
- "Read a dired shell command prompting with PROMPT.
-Passes the prefix argument ARG to `dired-mark-prompt', so that it
-can be used in the prompt to indicate which FILES are affected.
-Normally reads the command with `read-shell-command', but if the
-`dired-x' packages is loaded, uses `dired-guess-shell-command' to offer
-a smarter default choice of shell command."
+ "Read a dired shell command.
+PROMPT should be a format string with one \"%s\" format sequence,
+which is replaced by the value returned by `dired-mark-prompt',
+with ARG and FILES as its arguments. FILES should be a list of
+file names. The result is used as the prompt.
+
+This normally reads using `read-shell-command', but if the
+`dired-x' package is loaded, use `dired-guess-shell-command' to
+offer a smarter default choice of shell command."
(minibuffer-with-setup-hook
(lambda ()
(set (make-local-variable 'minibuffer-default-add-function)
'minibuffer-default-add-dired-shell-commands))
(setq prompt (format prompt (dired-mark-prompt arg files)))
- (if (featurep 'dired-x)
+ (if (functionp 'dired-guess-shell-command)
(dired-mark-pop-up nil 'shell files
- #'dired-guess-shell-command prompt files)
+ 'dired-guess-shell-command prompt files)
(dired-mark-pop-up nil 'shell files
- #'read-shell-command prompt nil nil))))
+ 'read-shell-command prompt nil nil))))
;;;###autoload
(defun dired-do-async-shell-command (command &optional arg file-list)
diff --git a/lisp/dired.el b/lisp/dired.el
index 8369d4897be..246127882f5 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2831,8 +2831,12 @@ also offers to kill buffers visiting deleted files and directories."
(if (= 1 count) "" "s"))
(defun dired-mark-prompt (arg files)
- "Return a string for use in a prompt, either the current file
-name, or the marker and a count of marked files."
+ "Return a string suitable for use in a Dired prompt.
+ARG is normally the prefix argument for the calling command.
+FILES should be a list of file names.
+
+The return value has a form like \"foo.txt\", \"[next 3 files]\",
+or \"* [3 files]\"."
;; distinguish-one-marked can cause the first element to be just t.
(if (eq (car files) t) (setq files (cdr files)))
(let ((count (length files)))
@@ -4104,7 +4108,7 @@ instead.
;;;***
;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump)
-;;;;;; "dired-x" "dired-x.el" "90459fb5998296fc67986945701b2bfc")
+;;;;;; "dired-x" "dired-x.el" "cb07aa079a02fde43b9fe1354a8b7a31")
;;; Generated autoloads from dired-x.el
(autoload 'dired-jump "dired-x" "\