From: Stefan Monnier Date: Wed, 4 Oct 2000 23:35:52 +0000 (+0000) Subject: (dired-do-create-files, dired-kill-tree): Turn comment into docstring. X-Git-Tag: emacs-pretest-21.0.90~1156 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=616e14f4cf26c2ec2bc06097cae9043a2f0118ec;p=emacs.git (dired-do-create-files, dired-kill-tree): Turn comment into docstring. --- diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 5c38c68ff97..b543dc9edd5 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1185,43 +1185,43 @@ ESC or `q' to not overwrite any of the remaining files, (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 @@ This function takes some pains to conform to `ls -lR' output." (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)