aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-06-22 15:30:33 +0800
committerChong Yidong2012-06-22 15:30:33 +0800
commitc5695d1d098bc4f275cfe4b4492a70779a06de02 (patch)
tree06c0828fd4ae6211750428d91ce070bce3027741
parentb6a92dfe32692a3a0d4023290ecfe169537c31a2 (diff)
downloademacs-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/ChangeLog14
-rw-r--r--lisp/dired-aux.el60
-rw-r--r--lisp/dired.el72
-rw-r--r--lisp/wdired.el4
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 @@
12012-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
12012-06-22 Glenn Morris <rgm@gnu.org> 152012-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
396INITIAL, if non-nil, is the initial minibuffer input. 396INITIAL, if non-nil, is the initial minibuffer input.
397OP-SYMBOL is an operation symbol (see `dired-no-confirm'). 397OP-SYMBOL is an operation symbol (see `dired-no-confirm').
398ARG is normally the prefix argument for the calling command. 398ARG is normally the prefix argument for the calling command;
399FILES should be a list of file names. 399it is passed as the first argument to `dired-mark-prompt'.
400FILES should be a list of marked files' names.
400 401
401DEFAULT-VALUE, if non-nil, should be a \"standard\" value or list 402Optional arg DEFAULT-VALUE is a default value or list of default
402of such values, available via history commands. Note that if the 403values, passed as the seventh arg to `completing-read'.
403user enters empty input, this function returns the empty string,
404not DEFAULT-VALUE.
405 404
406Optional argument COLLECTION is a collection of possible completions, 405Optional arg COLLECTION is a collection of possible completions,
407suitable for use by `completing-read'." 406passed 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
1408argument, the name of an old file, and returning either the 1407argument, the name of an old file, and returning either the
1409corresponding new file name or nil to skip. 1408corresponding new file name or nil to skip.
1410 1409
1411Optional MARKER-CHAR is a character with which to mark every 1410If optional argument MARKER-CHAR is non-nil, mark each
1412newfile's entry, or t to use the current marker character if the 1411newly-created file's Dired entry with the character MARKER-CHAR,
1413old file was marked." 1412or 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.
1516Prompts user for target, which is a directory in which to create 1515Prompt 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).
1520OP-SYMBOL is the symbol for the operation. Function `dired-mark-pop-up' 1520OP-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.
1522FILE-CREATOR and OPERATION as in `dired-create-files'. 1522FILE-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.
1724This normally preserves the last-modified date when copying. 1724When operating on just the current file, prompt for the new name.
1725When operating on just the current file, you specify the new name.
1726When operating on multiple or marked files, you specify a directory,
1727and new copies of these files are made in that directory
1728with the same names that the files currently have. The default
1729suggested for the target directory depends on the value of
1730`dired-dwim-target', which see.
1731 1725
1732This command copies symbolic links by creating new ones, 1726When operating on multiple or marked files, prompt for a target
1733like `cp -d'." 1727directory, and make the new copies in that directory, with the
1728same names as the original files. The initial suggestion for the
1729target directory is the Dired buffer's current directory (or, if
1730`dired-dwim-target' is non-nil, the current directory of a
1731neighboring Dired window).
1732
1733If `dired-copy-preserve-time' is non-nil, this command preserves
1734the modification time of each old file in the copy, similar to
1735the \"-p\" option for the \"cp\" shell command.
1736
1737This command copies symbolic links by creating new ones, similar
1738to 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.
2000If it is already present, overwrites previous entry, 2005If 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).
2002With a prefix arg, you may edit the `ls' switches used for this listing. 2008With 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.
173This means: if there is a dired buffer displayed in the next window, 173This means: if there is a Dired buffer displayed in the next
174use its current subdir, instead of the current subdir of this dired buffer. 174window, use its current directory, instead of this Dired buffer's
175current directory.
175 176
176The target is used in the prompt for file copy, rename etc." 177The 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.
2214If this is impossible, return FILE unchanged. 2215If DIR is omitted or nil, it defaults to `default-directory'.
2215DIR must be a directory name, not a file name." 2216If FILE is not in the directory tree of DIR, return FILE
2217unchanged."
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.
2734A value of nil means no recursive deletes. 2732If 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 2734without asking. This is dangerous!
2737without asking. 2735`top' means to ask for each top-level directory specified by the
2738Anything else means ask for each directory." 2736Dired deletion command, and delete its subdirectories without
2737asking.
2738Any 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.
3581A value of nil means no recursive copies. 3581If 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.
3584Anything else means ask for each directory." 3584Any 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" "\
3981Copy all marked (or next ARG) files, or copy the current file. 3981Copy all marked (or next ARG) files, or copy the current file.
3982This normally preserves the last-modified date when copying. 3982When operating on just the current file, prompt for the new name.
3983When operating on just the current file, you specify the new name.
3984When operating on multiple or marked files, you specify a directory,
3985and new copies of these files are made in that directory
3986with the same names that the files currently have. The default
3987suggested for the target directory depends on the value of
3988`dired-dwim-target', which see.
3989 3983
3990This command copies symbolic links by creating new ones, 3984When operating on multiple or marked files, prompt for a target
3991like `cp -d'. 3985directory, and make the new copies in that directory, with the
3986same names as the original files. The initial suggestion for the
3987target directory is the Dired buffer's current directory (or, if
3988`dired-dwim-target' is non-nil, the current directory of a
3989neighboring Dired window).
3990
3991If `dired-copy-preserve-time' is non-nil, this command preserves
3992the modification time of each old file in the copy, similar to
3993the \"-p\" option for the \"cp\" shell command.
3994
3995This command copies symbolic links by creating new ones, similar
3996to 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" "\
4094Insert this subdirectory into the same dired buffer. 4099Insert this subdirectory into the same Dired buffer.
4095If it is already present, overwrites previous entry, 4100If 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).
4097With a prefix arg, you may edit the `ls' switches used for this listing. 4103With 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>
189Press \\[wdired-finish-edit] to make the changes to take effect 189Press \\[wdired-finish-edit] to make the changes to take effect
190and exit. To abort the edit, use \\[wdired-abort-changes]. 190and exit. To abort the edit, use \\[wdired-abort-changes].
191 191