# HG changeset patch # User Stefan Monnier # Date 970702552 0 # Node ID bb6d168a6387d2a547d8e91546252ecbef884c71 # Parent f7c3f0fff3e7f39cca3298e8e15eca4c8b105418 (dired-do-create-files, dired-kill-tree): Turn comment into docstring. diff -r f7c3f0fff3e7 -r bb6d168a6387 lisp/dired-aux.el --- a/lisp/dired-aux.el Wed Oct 04 23:30:51 2000 +0000 +++ b/lisp/dired-aux.el Wed Oct 04 23:35:52 2000 +0000 @@ -1185,43 +1185,43 @@ (dired-move-to-filename)) (defun dired-do-create-files (op-symbol file-creator operation arg - &optional marker-char op1 - how-to) - ;; Create a new file for each marked file. - ;; Prompts user for target, which is a directory in which to create - ;; the new files. Target may be a plain file if only one marked - ;; file exists. - ;; OP-SYMBOL is the symbol for the operation. Function `dired-mark-pop-up' - ;; will determine whether pop-ups are appropriate for this OP-SYMBOL. - ;; FILE-CREATOR and OPERATION as in dired-create-files. - ;; ARG as in dired-get-marked-files. - ;; 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 is used to set the value of the into-dir variable - ;; which determines how to treat target. - ;; If into-dir is set to nil then target is not regarded as a directory, - ;; there must be exactly one marked file, else error. - ;; Else if into-dir is set to a list, then target is a genearlized - ;; directory (e.g. some sort of archive). The first element of into-dir - ;; must be a function with at least four arguments: - ;; operation as OPERATION above. - ;; rfn-list a list of the relative names for the marked files. - ;; fn-list a list of the absolute names for the marked files. - ;; target. - ;; The rest of into-dir are optional arguments. - ;; Else into-dir is not a list. Target is a directory. - ;; The marked file(s) are created inside the target directory. - ;; - ;; If HOW-TO is not given (or nil), then into-dir is set to true if - ;; target is a directory and otherwise to nil. - ;; Else if HOW-TO is t, then into-dir is set to nil. - ;; Else HOW-TO is assumed to be a function of one argument, target, - ;; that looks at target and returns a value for the into-dir - ;; variable. The function dired-into-dir-with-symlinks is provided - ;; for the case (common when creating symlinks) that symbolic - ;; links to directories are not to be considered as directories - ;; (as file-directory-p would if HOW-TO had been nil). + &optional marker-char op1 + how-to) + "Create a new file for each marked file. +Prompts user for target, which is a directory in which to create + the new files. Target may be a plain file if only one marked + file exists. +OP-SYMBOL is the symbol for the operation. Function `dired-mark-pop-up' + will determine whether pop-ups are appropriate for this OP-SYMBOL. +FILE-CREATOR and OPERATION as in `dired-create-files'. +ARG as in `dired-get-marked-files'. +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 is used to set the value of the into-dir variable + which determines how to treat target. + If into-dir is set to nil then target is not regarded as a directory, + there must be exactly one marked file, else error. + Else if into-dir is set to a list, then target is a generalized + directory (e.g. some sort of archive). The first element of into-dir + must be a function with at least four arguments: + operation as OPERATION above. + rfn-list a list of the relative names for the marked files. + fn-list a list of the absolute names for the marked files. + target. + The rest of into-dir are optional arguments. + Else into-dir is not a list. Target is a directory. + The marked file(s) are created inside the target directory. + + If HOW-TO is not given (or nil), then into-dir is set to true if + target is a directory and otherwise to nil. + Else if HOW-TO is t, then into-dir is set to nil. + Else HOW-TO is assumed to be a function of one argument, target, + that looks at target and returns a value for the into-dir + variable. The function `dired-into-dir-with-symlinks' is provided + for the case (common when creating symlinks) that symbolic + links to directories are not to be considered as directories + (as `file-directory-p' would if HOW-TO had been nil)." (or op1 (setq op1 operation)) (let* ((fn-list (dired-get-marked-files nil arg)) (rfn-list (mapcar (function dired-make-relative) fn-list)) @@ -1640,8 +1640,8 @@ (dired-get-subdir-min elt2))))))) (defun dired-kill-tree (dirname &optional remember-marks) - ;;"Kill all proper subdirs of DIRNAME, excluding DIRNAME itself. - ;; With optional arg REMEMBER-MARKS, return an alist of marked files." + "Kill all proper subdirs of DIRNAME, excluding DIRNAME itself. +With optional arg REMEMBER-MARKS, return an alist of marked files." (interactive "DKill tree below directory: ") (setq dirname (expand-file-name dirname)) (let ((s-alist dired-subdir-alist) dir m-alist)