aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2009-12-17 02:06:31 +0000
committerJuanma Barranquero2009-12-17 02:06:31 +0000
commit9762b219c8253c8e71564b36979753768d6db24f (patch)
tree0d347a870865eac79171fc7bb9b92df08e8fdf0d
parentcfb54897c9ba6e11352e89d1767c992b7841d035 (diff)
downloademacs-9762b219c8253c8e71564b36979753768d6db24f.tar.gz
emacs-9762b219c8253c8e71564b36979753768d6db24f.zip
Some doc fixes (more needed).
* find-cmd.el (find-constituents): Reflow docstring. (find-cmd, find-prune, find-command): Fix typos in docstrings. (find-generic): Doc fix.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/find-cmd.el32
2 files changed, 26 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 05bad0f012b..ed32bd2db82 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12009-12-17 Juanma Barranquero <lekktu@gmail.com>
2
3 Some doc fixes (more needed).
4
5 * find-cmd.el (find-constituents): Reflow docstring.
6 (find-cmd, find-prune, find-command): Fix typos in docstrings.
7 (find-generic): Doc fix.
8
12009-12-17 Juri Linkov <juri@jurta.org> 92009-12-17 Juri Linkov <juri@jurta.org>
2 10
3 Fix regression from 23.1 to allow multiple modes in Local Variables. 11 Fix regression from 23.1 to allow multiple modes in Local Variables.
@@ -661,7 +669,7 @@
661 669
662 * progmodes/cc-mode.el (c-basic-common-init): 670 * progmodes/cc-mode.el (c-basic-common-init):
663 Call c-state-cache-init. 671 Call c-state-cache-init.
664 (c-neutralize-syntax-in-and-mark-CPP): Rename from 672 (c-neutralize-syntax-in-and-mark-CPP): Rename from
665 c-extend-and-neutralize-syntax-in-CPP. Mark each CPP construct by 673 c-extend-and-neutralize-syntax-in-CPP. Mark each CPP construct by
666 placing `category' properties value 'c-cpp-delimiter at its boundaries. 674 placing `category' properties value 'c-cpp-delimiter at its boundaries.
667 675
diff --git a/lisp/find-cmd.el b/lisp/find-cmd.el
index 877b96c1467..53c8f8758db 100644
--- a/lisp/find-cmd.el
+++ b/lisp/find-cmd.el
@@ -23,7 +23,7 @@
23;;; Commentary: 23;;; Commentary:
24 24
25;; With this module you can build up a (hopefully) valid find(1) 25;; With this module you can build up a (hopefully) valid find(1)
26;; string ready for the command line. For example: 26;; string ready for the command line. For example:
27 27
28;; (find-cmd '(prune (name ".svn" ".git" ".CVS")) 28;; (find-cmd '(prune (name ".svn" ".git" ".CVS"))
29;; '(and (or (name "*.pl" "*.pm" "*.t") 29;; '(and (or (name "*.pl" "*.pm" "*.t")
@@ -120,22 +120,23 @@
120 (ok . (1 find-command t)) 120 (ok . (1 find-command t))
121 (execdir . (1 find-command t)) 121 (execdir . (1 find-command t))
122 (okdir . (1 find-command t))) 122 (okdir . (1 find-command t)))
123 "Holds details of each of the find options. The car of each 123 "Holds details of each of the find options.
124alist is the name. The cdr is minimum args, the function used 124The car of each alist is the name. The cdr is minimum args, the
125to join many occurences of the argument together, and whether or 125function used to join many occurences of the argument together,
126not to leave quotes off the string (non-nil means the string will 126and whether or not to leave quotes off the string (non-nil means
127be quoted).") 127the string will be quoted).")
128 128
129;;;###autoload 129;;;###autoload
130(defun find-cmd (&rest subfinds) 130(defun find-cmd (&rest subfinds)
131 "Initiate the building of a find command. For exmple: 131 "Initiate the building of a find command.
132For example:
132 133
133\(find-cmd '\(prune \(name \".svn\" \".git\" \".CVS\"\)\) 134\(find-cmd '\(prune \(name \".svn\" \".git\" \".CVS\"\)\)
134 '\(and \(or \(name \"*.pl\" \"*.pm\" \"*.t\"\) 135 '\(and \(or \(name \"*.pl\" \"*.pm\" \"*.t\"\)
135 \(mtime \"+1\"\)\) 136 \(mtime \"+1\"\)\)
136 \(fstype \"nfs\" \"ufs\"\)\)\)\) 137 \(fstype \"nfs\" \"ufs\"\)\)\)\)
137 138
138`default-directory' is used as the initial search path. The 139`default-directory' is used as the initial search path. The
139result is a string that should be ready for the command line." 140result is a string that should be ready for the command line."
140 (concat 141 (concat
141 "find " (shell-quote-argument (expand-file-name default-directory)) " " 142 "find " (shell-quote-argument (expand-file-name default-directory)) " "
@@ -178,7 +179,7 @@ suffice:
178 (concat "-not " (find-or (mapcar 'find-to-string form)))) 179 (concat "-not " (find-or (mapcar 'find-to-string form))))
179 180
180(defun find-prune (form) 181(defun find-prune (form)
181 "-or together FORM(s) postfix '-prune' and then -or that with a 182 "-or together FORMs postfix '-prune' and then -or that with a
182-true, so: 183-true, so:
183 \(prune \(name \".svn\" \".git\"\)\) \(name \"*.pm\"\) 184 \(prune \(name \".svn\" \".git\"\)\) \(name \"*.pm\"\)
184will produce (unwrapped): 185will produce (unwrapped):
@@ -190,11 +191,12 @@ will produce (unwrapped):
190 (find-generic "true")))) 191 (find-generic "true"))))
191 192
192(defun find-generic (option &optional oper argcount args dont-quote) 193(defun find-generic (option &optional oper argcount args dont-quote)
193 "This function allows an arbitrary string to be used as a 194 "Allow an arbitrary string to be used as a form.
194form. OPTION is the name of the form, OPER is the function used 195OPTION is the name of the form, OPER is the function used to either
195to either OR or AND multiple results together. ARGCOUNT is the 196OR or AND multiple results together. ARGCOUNT is the minimum of
196minimum of args that OPTION can receive and ARGS are the 197args that OPTION can receive and ARGS are the arguments for OPTION.
197arguments for OPTION." 198If DONT-QUOTE is non-nil, arguments are quoted for passing them to
199the shell."
198 (when (and (numberp argcount) (< (length args) argcount)) 200 (when (and (numberp argcount) (< (length args) argcount))
199 (error "'%s' needs at least %d arguments" option argcount)) 201 (error "'%s' needs at least %d arguments" option argcount))
200 (let ((oper (or oper 'find-or))) 202 (let ((oper (or oper 'find-or)))
@@ -211,7 +213,7 @@ arguments for OPTION."
211 213
212(defun find-command (form) 214(defun find-command (form)
213 "For each item in FORM add a terminating semi-colon and turn 215 "For each item in FORM add a terminating semi-colon and turn
214them into valid switches. The result is -and(ed) together." 216them into valid switches. The result is -and(ed) together."
215 (find-and (mapcar (lambda (x) 217 (find-and (mapcar (lambda (x)
216 (concat (find-to-string x) "\\; ")) 218 (concat (find-to-string x) "\\; "))
217 form))) 219 form)))