diff options
| author | Chong Yidong | 2012-06-22 15:30:33 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-06-22 15:30:33 +0800 |
| commit | c5695d1d098bc4f275cfe4b4492a70779a06de02 (patch) | |
| tree | 06c0828fd4ae6211750428d91ce070bce3027741 | |
| parent | b6a92dfe32692a3a0d4023290ecfe169537c31a2 (diff) | |
| download | emacs-c5695d1d098bc4f275cfe4b4492a70779a06de02.tar.gz emacs-c5695d1d098bc4f275cfe4b4492a70779a06de02.zip | |
Misc doc fixes for Dired.
* dired-aux.el (dired-do-create-files): Doc fix (Bug#11327).
(dired-create-files): Doc fix (Bug#11329).
(dired-do-copy): Doc fix (Bug#11334).
(dired-mark-read-string): Doc fix (Bug#11553).
* dired.el (dired-recursive-copies, dired-recursive-deletes): Doc
fix (Bug#11326).
(dired-make-relative): Doc fix (Bug#11332). Remove unused arg.
(dired-dwim-target): Doc fix.
* wdired.el (wdired-mode): Doc fix.
| -rw-r--r-- | lisp/ChangeLog | 14 | ||||
| -rw-r--r-- | lisp/dired-aux.el | 60 | ||||
| -rw-r--r-- | lisp/dired.el | 72 | ||||
| -rw-r--r-- | lisp/wdired.el | 4 |
4 files changed, 88 insertions, 62 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6ac1cc95d4d..1119a52c451 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2012-06-22 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * dired-aux.el (dired-do-create-files): Doc fix (Bug#11327). | ||
| 4 | (dired-create-files): Doc fix (Bug#11329). | ||
| 5 | (dired-do-copy): Doc fix (Bug#11334). | ||
| 6 | (dired-mark-read-string): Doc fix (Bug#11553). | ||
| 7 | |||
| 8 | * dired.el (dired-recursive-copies, dired-recursive-deletes): Doc | ||
| 9 | fix (Bug#11326). | ||
| 10 | (dired-make-relative): Doc fix (Bug#11332). Remove unused arg. | ||
| 11 | (dired-dwim-target): Doc fix. | ||
| 12 | |||
| 13 | * wdired.el (wdired-mode): Doc fix. | ||
| 14 | |||
| 1 | 2012-06-22 Glenn Morris <rgm@gnu.org> | 15 | 2012-06-22 Glenn Morris <rgm@gnu.org> |
| 2 | 16 | ||
| 3 | * pcmpl-rpm.el (pcmpl-rpm): New group. | 17 | * pcmpl-rpm.el (pcmpl-rpm): New group. |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 8a499c47464..ffd93a85ee8 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -395,16 +395,15 @@ Return the user input (a string). | |||
| 395 | 395 | ||
| 396 | INITIAL, if non-nil, is the initial minibuffer input. | 396 | INITIAL, if non-nil, is the initial minibuffer input. |
| 397 | OP-SYMBOL is an operation symbol (see `dired-no-confirm'). | 397 | OP-SYMBOL is an operation symbol (see `dired-no-confirm'). |
| 398 | ARG is normally the prefix argument for the calling command. | 398 | ARG is normally the prefix argument for the calling command; |
| 399 | FILES should be a list of file names. | 399 | it is passed as the first argument to `dired-mark-prompt'. |
| 400 | FILES should be a list of marked files' names. | ||
| 400 | 401 | ||
| 401 | DEFAULT-VALUE, if non-nil, should be a \"standard\" value or list | 402 | Optional arg DEFAULT-VALUE is a default value or list of default |
| 402 | of such values, available via history commands. Note that if the | 403 | values, passed as the seventh arg to `completing-read'. |
| 403 | user enters empty input, this function returns the empty string, | ||
| 404 | not DEFAULT-VALUE. | ||
| 405 | 404 | ||
| 406 | Optional argument COLLECTION is a collection of possible completions, | 405 | Optional arg COLLECTION is a collection of possible completions, |
| 407 | suitable for use by `completing-read'." | 406 | passed as the second arg to `completing-read'." |
| 408 | (dired-mark-pop-up nil op-symbol files | 407 | (dired-mark-pop-up nil op-symbol files |
| 409 | 'completing-read | 408 | 'completing-read |
| 410 | (format prompt (dired-mark-prompt arg files)) | 409 | (format prompt (dired-mark-prompt arg files)) |
| @@ -1408,9 +1407,9 @@ NAME-CONSTRUCTOR should be a function accepting a single | |||
| 1408 | argument, the name of an old file, and returning either the | 1407 | argument, the name of an old file, and returning either the |
| 1409 | corresponding new file name or nil to skip. | 1408 | corresponding new file name or nil to skip. |
| 1410 | 1409 | ||
| 1411 | Optional MARKER-CHAR is a character with which to mark every | 1410 | If optional argument MARKER-CHAR is non-nil, mark each |
| 1412 | newfile's entry, or t to use the current marker character if the | 1411 | newly-created file's Dired entry with the character MARKER-CHAR, |
| 1413 | old file was marked." | 1412 | or with the current marker character if MARKER-CHAR is t." |
| 1414 | (let (dired-create-files-failures failures | 1413 | (let (dired-create-files-failures failures |
| 1415 | skipped (success-count 0) (total (length fn-list))) | 1414 | skipped (success-count 0) (total (length fn-list))) |
| 1416 | (let (to overwrite-query | 1415 | (let (to overwrite-query |
| @@ -1513,10 +1512,11 @@ ESC or `q' to not overwrite any of the remaining files, | |||
| 1513 | &optional marker-char op1 | 1512 | &optional marker-char op1 |
| 1514 | how-to) | 1513 | how-to) |
| 1515 | "Create a new file for each marked file. | 1514 | "Create a new file for each marked file. |
| 1516 | Prompts user for target, which is a directory in which to create | 1515 | Prompt user for a target directory in which to create the new |
| 1517 | the new files. Target may also be a plain file if only one marked | 1516 | files. The target may also be a non-directory file, if only |
| 1518 | file exists. The way the default for the target directory is | 1517 | one file is marked. The initial suggestion for target is the |
| 1519 | computed depends on the value of `dired-dwim-target-directory'. | 1518 | Dired buffer's current directory (or, if `dired-dwim-target' is |
| 1519 | non-nil, the current directory of a neighboring Dired window). | ||
| 1520 | OP-SYMBOL is the symbol for the operation. Function `dired-mark-pop-up' | 1520 | OP-SYMBOL is the symbol for the operation. Function `dired-mark-pop-up' |
| 1521 | will determine whether pop-ups are appropriate for this OP-SYMBOL. | 1521 | will determine whether pop-ups are appropriate for this OP-SYMBOL. |
| 1522 | FILE-CREATOR and OPERATION as in `dired-create-files'. | 1522 | FILE-CREATOR and OPERATION as in `dired-create-files'. |
| @@ -1721,16 +1721,21 @@ See HOW-TO argument for `dired-do-create-files'.") | |||
| 1721 | ;;;###autoload | 1721 | ;;;###autoload |
| 1722 | (defun dired-do-copy (&optional arg) | 1722 | (defun dired-do-copy (&optional arg) |
| 1723 | "Copy all marked (or next ARG) files, or copy the current file. | 1723 | "Copy all marked (or next ARG) files, or copy the current file. |
| 1724 | This normally preserves the last-modified date when copying. | 1724 | When operating on just the current file, prompt for the new name. |
| 1725 | When operating on just the current file, you specify the new name. | ||
| 1726 | When operating on multiple or marked files, you specify a directory, | ||
| 1727 | and new copies of these files are made in that directory | ||
| 1728 | with the same names that the files currently have. The default | ||
| 1729 | suggested for the target directory depends on the value of | ||
| 1730 | `dired-dwim-target', which see. | ||
| 1731 | 1725 | ||
| 1732 | This command copies symbolic links by creating new ones, | 1726 | When operating on multiple or marked files, prompt for a target |
| 1733 | like `cp -d'." | 1727 | directory, and make the new copies in that directory, with the |
| 1728 | same names as the original files. The initial suggestion for the | ||
| 1729 | target directory is the Dired buffer's current directory (or, if | ||
| 1730 | `dired-dwim-target' is non-nil, the current directory of a | ||
| 1731 | neighboring Dired window). | ||
| 1732 | |||
| 1733 | If `dired-copy-preserve-time' is non-nil, this command preserves | ||
| 1734 | the modification time of each old file in the copy, similar to | ||
| 1735 | the \"-p\" option for the \"cp\" shell command. | ||
| 1736 | |||
| 1737 | This command copies symbolic links by creating new ones, similar | ||
| 1738 | to the \"-d\" option for the \"cp\" shell command." | ||
| 1734 | (interactive "P") | 1739 | (interactive "P") |
| 1735 | (let ((dired-recursive-copies dired-recursive-copies)) | 1740 | (let ((dired-recursive-copies dired-recursive-copies)) |
| 1736 | (dired-do-create-files 'copy (function dired-copy-file) | 1741 | (dired-do-create-files 'copy (function dired-copy-file) |
| @@ -1996,9 +2001,10 @@ See Info node `(emacs)Subdir switches' for more details." | |||
| 1996 | 2001 | ||
| 1997 | ;;;###autoload | 2002 | ;;;###autoload |
| 1998 | (defun dired-insert-subdir (dirname &optional switches no-error-if-not-dir-p) | 2003 | (defun dired-insert-subdir (dirname &optional switches no-error-if-not-dir-p) |
| 1999 | "Insert this subdirectory into the same dired buffer. | 2004 | "Insert this subdirectory into the same Dired buffer. |
| 2000 | If it is already present, overwrites previous entry, | 2005 | If it is already present, overwrite the previous entry; |
| 2001 | else inserts it at its natural place (as `ls -lR' would have done). | 2006 | otherwise, insert it at its natural place (as `ls -lR' would |
| 2007 | have done). | ||
| 2002 | With a prefix arg, you may edit the `ls' switches used for this listing. | 2008 | With a prefix arg, you may edit the `ls' switches used for this listing. |
| 2003 | You can add `R' to the switches to expand the whole tree starting at | 2009 | You can add `R' to the switches to expand the whole tree starting at |
| 2004 | this subdirectory. | 2010 | this subdirectory. |
diff --git a/lisp/dired.el b/lisp/dired.el index 7428087ca8f..68e1e574a00 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -170,8 +170,9 @@ If a character, new links are unconditionally marked with that character." | |||
| 170 | 170 | ||
| 171 | (defcustom dired-dwim-target nil | 171 | (defcustom dired-dwim-target nil |
| 172 | "If non-nil, Dired tries to guess a default target directory. | 172 | "If non-nil, Dired tries to guess a default target directory. |
| 173 | This means: if there is a dired buffer displayed in the next window, | 173 | This means: if there is a Dired buffer displayed in the next |
| 174 | use its current subdir, instead of the current subdir of this dired buffer. | 174 | window, use its current directory, instead of this Dired buffer's |
| 175 | current directory. | ||
| 175 | 176 | ||
| 176 | The target is used in the prompt for file copy, rename etc." | 177 | The target is used in the prompt for file copy, rename etc." |
| 177 | :type 'boolean | 178 | :type 'boolean |
| @@ -2209,10 +2210,11 @@ Optional arg GLOBAL means to replace all matches." | |||
| 2209 | ;; dired-get-filename. | 2210 | ;; dired-get-filename. |
| 2210 | (concat (or dir default-directory) file)) | 2211 | (concat (or dir default-directory) file)) |
| 2211 | 2212 | ||
| 2212 | (defun dired-make-relative (file &optional dir _ignore) | 2213 | (defun dired-make-relative (file &optional dir) |
| 2213 | "Convert FILE (an absolute file name) to a name relative to DIR. | 2214 | "Convert FILE (an absolute file name) to a name relative to DIR. |
| 2214 | If this is impossible, return FILE unchanged. | 2215 | If DIR is omitted or nil, it defaults to `default-directory'. |
| 2215 | DIR must be a directory name, not a file name." | 2216 | If FILE is not in the directory tree of DIR, return FILE |
| 2217 | unchanged." | ||
| 2216 | (or dir (setq dir default-directory)) | 2218 | (or dir (setq dir default-directory)) |
| 2217 | ;; This case comes into play if default-directory is set to | 2219 | ;; This case comes into play if default-directory is set to |
| 2218 | ;; use ~. | 2220 | ;; use ~. |
| @@ -2220,8 +2222,6 @@ DIR must be a directory name, not a file name." | |||
| 2220 | (setq dir (expand-file-name dir))) | 2222 | (setq dir (expand-file-name dir))) |
| 2221 | (if (string-match (concat "^" (regexp-quote dir)) file) | 2223 | (if (string-match (concat "^" (regexp-quote dir)) file) |
| 2222 | (substring file (match-end 0)) | 2224 | (substring file (match-end 0)) |
| 2223 | ;;; (or no-error | ||
| 2224 | ;;; (error "%s: not in directory tree growing at %s" file dir)) | ||
| 2225 | file)) | 2225 | file)) |
| 2226 | 2226 | ||
| 2227 | ;;; Functions for finding the file name in a dired buffer line. | 2227 | ;;; Functions for finding the file name in a dired buffer line. |
| @@ -2467,8 +2467,6 @@ You can then feed the file name(s) to other commands with \\[yank]." | |||
| 2467 | dired-subdir-alist)))) | 2467 | dired-subdir-alist)))) |
| 2468 | cur-dir)))) | 2468 | cur-dir)))) |
| 2469 | 2469 | ||
| 2470 | ;(defun dired-get-subdir-min (elt) | ||
| 2471 | ; (cdr elt)) | ||
| 2472 | ;; can't use macro, must be redefinable for other alist format in dired-nstd. | 2470 | ;; can't use macro, must be redefinable for other alist format in dired-nstd. |
| 2473 | (defalias 'dired-get-subdir-min 'cdr) | 2471 | (defalias 'dired-get-subdir-min 'cdr) |
| 2474 | 2472 | ||
| @@ -2730,12 +2728,14 @@ Optional argument means return a file name relative to `default-directory'." | |||
| 2730 | ;; Deleting files | 2728 | ;; Deleting files |
| 2731 | 2729 | ||
| 2732 | (defcustom dired-recursive-deletes 'top | 2730 | (defcustom dired-recursive-deletes 'top |
| 2733 | "Decide whether recursive deletes are allowed. | 2731 | "Whether Dired deletes directories recursively. |
| 2734 | A value of nil means no recursive deletes. | 2732 | If nil, Dired will not delete non-empty directories. |
| 2735 | `always' means delete recursively without asking. This is DANGEROUS! | 2733 | `always' means to delete non-empty directories recursively, |
| 2736 | `top' means ask for each directory at top level, but delete its subdirectories | 2734 | without asking. This is dangerous! |
| 2737 | without asking. | 2735 | `top' means to ask for each top-level directory specified by the |
| 2738 | Anything else means ask for each directory." | 2736 | Dired deletion command, and delete its subdirectories without |
| 2737 | asking. | ||
| 2738 | Any other value means to ask for each directory." | ||
| 2739 | :type '(choice :tag "Delete non-empty directories" | 2739 | :type '(choice :tag "Delete non-empty directories" |
| 2740 | (const :tag "Yes" always) | 2740 | (const :tag "Yes" always) |
| 2741 | (const :tag "No--only delete empty directories" nil) | 2741 | (const :tag "No--only delete empty directories" nil) |
| @@ -3577,11 +3577,11 @@ To be called first in body of `dired-sort-other', etc." | |||
| 3577 | ;;;; Drag and drop support | 3577 | ;;;; Drag and drop support |
| 3578 | 3578 | ||
| 3579 | (defcustom dired-recursive-copies 'top | 3579 | (defcustom dired-recursive-copies 'top |
| 3580 | "Decide whether recursive copies are allowed. | 3580 | "Whether Dired copies directories recursively. |
| 3581 | A value of nil means no recursive copies. | 3581 | If nil, never copy recursively. |
| 3582 | `always' means copy recursively without asking. | 3582 | `always' means to copy recursively without asking. |
| 3583 | `top' means ask for each directory at top level. | 3583 | `top' means to ask for each directory at top level. |
| 3584 | Anything else means ask for each directory." | 3584 | Any other value means to ask for each directory." |
| 3585 | :type '(choice :tag "Copy directories" | 3585 | :type '(choice :tag "Copy directories" |
| 3586 | (const :tag "No recursive copies" nil) | 3586 | (const :tag "No recursive copies" nil) |
| 3587 | (const :tag "Ask for each directory" t) | 3587 | (const :tag "Ask for each directory" t) |
| @@ -3739,7 +3739,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." | |||
| 3739 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command | 3739 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command |
| 3740 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown | 3740 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown |
| 3741 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff | 3741 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff |
| 3742 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "de7e4c64718c8ba8438a6397a460bf23") | 3742 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "91d39bd8f7e9ce93dc752fe74bea78c2") |
| 3743 | ;;; Generated autoloads from dired-aux.el | 3743 | ;;; Generated autoloads from dired-aux.el |
| 3744 | 3744 | ||
| 3745 | (autoload 'dired-diff "dired-aux" "\ | 3745 | (autoload 'dired-diff "dired-aux" "\ |
| @@ -3979,16 +3979,21 @@ If DIRECTORY already exists, signal an error. | |||
| 3979 | 3979 | ||
| 3980 | (autoload 'dired-do-copy "dired-aux" "\ | 3980 | (autoload 'dired-do-copy "dired-aux" "\ |
| 3981 | Copy all marked (or next ARG) files, or copy the current file. | 3981 | Copy all marked (or next ARG) files, or copy the current file. |
| 3982 | This normally preserves the last-modified date when copying. | 3982 | When operating on just the current file, prompt for the new name. |
| 3983 | When operating on just the current file, you specify the new name. | ||
| 3984 | When operating on multiple or marked files, you specify a directory, | ||
| 3985 | and new copies of these files are made in that directory | ||
| 3986 | with the same names that the files currently have. The default | ||
| 3987 | suggested for the target directory depends on the value of | ||
| 3988 | `dired-dwim-target', which see. | ||
| 3989 | 3983 | ||
| 3990 | This command copies symbolic links by creating new ones, | 3984 | When operating on multiple or marked files, prompt for a target |
| 3991 | like `cp -d'. | 3985 | directory, and make the new copies in that directory, with the |
| 3986 | same names as the original files. The initial suggestion for the | ||
| 3987 | target directory is the Dired buffer's current directory (or, if | ||
| 3988 | `dired-dwim-target' is non-nil, the current directory of a | ||
| 3989 | neighboring Dired window). | ||
| 3990 | |||
| 3991 | If `dired-copy-preserve-time' is non-nil, this command preserves | ||
| 3992 | the modification time of each old file in the copy, similar to | ||
| 3993 | the \"-p\" option for the \"cp\" shell command. | ||
| 3994 | |||
| 3995 | This command copies symbolic links by creating new ones, similar | ||
| 3996 | to the \"-d\" option for the \"cp\" shell command. | ||
| 3992 | 3997 | ||
| 3993 | \(fn &optional ARG)" t nil) | 3998 | \(fn &optional ARG)" t nil) |
| 3994 | 3999 | ||
| @@ -4091,9 +4096,10 @@ See Info node `(emacs)Subdir switches' for more details. | |||
| 4091 | \(fn DIRNAME &optional SWITCHES NO-ERROR-IF-NOT-DIR-P)" t nil) | 4096 | \(fn DIRNAME &optional SWITCHES NO-ERROR-IF-NOT-DIR-P)" t nil) |
| 4092 | 4097 | ||
| 4093 | (autoload 'dired-insert-subdir "dired-aux" "\ | 4098 | (autoload 'dired-insert-subdir "dired-aux" "\ |
| 4094 | Insert this subdirectory into the same dired buffer. | 4099 | Insert this subdirectory into the same Dired buffer. |
| 4095 | If it is already present, overwrites previous entry, | 4100 | If it is already present, overwrite the previous entry; |
| 4096 | else inserts it at its natural place (as `ls -lR' would have done). | 4101 | otherwise, insert it at its natural place (as `ls -lR' would |
| 4102 | have done). | ||
| 4097 | With a prefix arg, you may edit the `ls' switches used for this listing. | 4103 | With a prefix arg, you may edit the `ls' switches used for this listing. |
| 4098 | You can add `R' to the switches to expand the whole tree starting at | 4104 | You can add `R' to the switches to expand the whole tree starting at |
| 4099 | this subdirectory. | 4105 | this subdirectory. |
diff --git a/lisp/wdired.el b/lisp/wdired.el index fe5b4ef7b79..f65574c26ad 100644 --- a/lisp/wdired.el +++ b/lisp/wdired.el | |||
| @@ -184,8 +184,8 @@ program `dired-chmod-program', which must exist." | |||
| 184 | 184 | ||
| 185 | 185 | ||
| 186 | (defun wdired-mode () | 186 | (defun wdired-mode () |
| 187 | "\\<wdired-mode-map>File Names Editing mode. | 187 | "Writable Dired mode. |
| 188 | 188 | \\<wdired-mode-map> | |
| 189 | Press \\[wdired-finish-edit] to make the changes to take effect | 189 | Press \\[wdired-finish-edit] to make the changes to take effect |
| 190 | and exit. To abort the edit, use \\[wdired-abort-changes]. | 190 | and exit. To abort the edit, use \\[wdired-abort-changes]. |
| 191 | 191 | ||