diff options
| author | Chong Yidong | 2011-07-11 22:54:26 -0400 |
|---|---|---|
| committer | Chong Yidong | 2011-07-11 22:54:26 -0400 |
| commit | f69fd0d2fb66ec97cf315e7ef5b0e6b402822af0 (patch) | |
| tree | db948e380bfb1598f790eb7fd004375ea9bc8ea9 | |
| parent | d988232217c0f545bb87c07dba9afd0e4418c610 (diff) | |
| download | emacs-f69fd0d2fb66ec97cf315e7ef5b0e6b402822af0.tar.gz emacs-f69fd0d2fb66ec97cf315e7ef5b0e6b402822af0.zip | |
Minor Dired doc fixes.
* lisp/dired.el (dired-mark-prompt):
* lisp/dired-aux.el (dired-read-shell-command): Doc fix.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/dired-aux.el | 21 | ||||
| -rw-r--r-- | lisp/dired.el | 10 |
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 @@ | |||
| 1 | 2011-07-12 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * dired.el (dired-mark-prompt): | ||
| 4 | * dired-aux.el (dired-read-shell-command): Doc fix. | ||
| 5 | |||
| 1 | 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 7 | ||
| 3 | * mail/sendmail.el (sendmail-query-once): Use | 8 | * 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." | |||
| 514 | 514 | ||
| 515 | ;; This is an extra function so that you can redefine it, e.g., to use gmhist. | 515 | ;; This is an extra function so that you can redefine it, e.g., to use gmhist. |
| 516 | (defun dired-read-shell-command (prompt arg files) | 516 | (defun dired-read-shell-command (prompt arg files) |
| 517 | "Read a dired shell command prompting with PROMPT. | 517 | "Read a dired shell command. |
| 518 | Passes the prefix argument ARG to `dired-mark-prompt', so that it | 518 | PROMPT should be a format string with one \"%s\" format sequence, |
| 519 | can be used in the prompt to indicate which FILES are affected. | 519 | which is replaced by the value returned by `dired-mark-prompt', |
| 520 | Normally reads the command with `read-shell-command', but if the | 520 | with ARG and FILES as its arguments. FILES should be a list of |
| 521 | `dired-x' packages is loaded, uses `dired-guess-shell-command' to offer | 521 | file names. The result is used as the prompt. |
| 522 | a smarter default choice of shell command." | 522 | |
| 523 | This normally reads using `read-shell-command', but if the | ||
| 524 | `dired-x' package is loaded, use `dired-guess-shell-command' to | ||
| 525 | offer a smarter default choice of shell command." | ||
| 523 | (minibuffer-with-setup-hook | 526 | (minibuffer-with-setup-hook |
| 524 | (lambda () | 527 | (lambda () |
| 525 | (set (make-local-variable 'minibuffer-default-add-function) | 528 | (set (make-local-variable 'minibuffer-default-add-function) |
| 526 | 'minibuffer-default-add-dired-shell-commands)) | 529 | 'minibuffer-default-add-dired-shell-commands)) |
| 527 | (setq prompt (format prompt (dired-mark-prompt arg files))) | 530 | (setq prompt (format prompt (dired-mark-prompt arg files))) |
| 528 | (if (featurep 'dired-x) | 531 | (if (functionp 'dired-guess-shell-command) |
| 529 | (dired-mark-pop-up nil 'shell files | 532 | (dired-mark-pop-up nil 'shell files |
| 530 | #'dired-guess-shell-command prompt files) | 533 | 'dired-guess-shell-command prompt files) |
| 531 | (dired-mark-pop-up nil 'shell files | 534 | (dired-mark-pop-up nil 'shell files |
| 532 | #'read-shell-command prompt nil nil)))) | 535 | 'read-shell-command prompt nil nil)))) |
| 533 | 536 | ||
| 534 | ;;;###autoload | 537 | ;;;###autoload |
| 535 | (defun dired-do-async-shell-command (command &optional arg file-list) | 538 | (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." | |||
| 2831 | (if (= 1 count) "" "s")) | 2831 | (if (= 1 count) "" "s")) |
| 2832 | 2832 | ||
| 2833 | (defun dired-mark-prompt (arg files) | 2833 | (defun dired-mark-prompt (arg files) |
| 2834 | "Return a string for use in a prompt, either the current file | 2834 | "Return a string suitable for use in a Dired prompt. |
| 2835 | name, or the marker and a count of marked files." | 2835 | ARG is normally the prefix argument for the calling command. |
| 2836 | FILES should be a list of file names. | ||
| 2837 | |||
| 2838 | The return value has a form like \"foo.txt\", \"[next 3 files]\", | ||
| 2839 | or \"* [3 files]\"." | ||
| 2836 | ;; distinguish-one-marked can cause the first element to be just t. | 2840 | ;; distinguish-one-marked can cause the first element to be just t. |
| 2837 | (if (eq (car files) t) (setq files (cdr files))) | 2841 | (if (eq (car files) t) (setq files (cdr files))) |
| 2838 | (let ((count (length files))) | 2842 | (let ((count (length files))) |
| @@ -4104,7 +4108,7 @@ instead. | |||
| 4104 | ;;;*** | 4108 | ;;;*** |
| 4105 | 4109 | ||
| 4106 | ;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump) | 4110 | ;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump) |
| 4107 | ;;;;;; "dired-x" "dired-x.el" "90459fb5998296fc67986945701b2bfc") | 4111 | ;;;;;; "dired-x" "dired-x.el" "cb07aa079a02fde43b9fe1354a8b7a31") |
| 4108 | ;;; Generated autoloads from dired-x.el | 4112 | ;;; Generated autoloads from dired-x.el |
| 4109 | 4113 | ||
| 4110 | (autoload 'dired-jump "dired-x" "\ | 4114 | (autoload 'dired-jump "dired-x" "\ |