diff options
| author | Juanma Barranquero | 2009-12-17 02:06:31 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2009-12-17 02:06:31 +0000 |
| commit | 9762b219c8253c8e71564b36979753768d6db24f (patch) | |
| tree | 0d347a870865eac79171fc7bb9b92df08e8fdf0d | |
| parent | cfb54897c9ba6e11352e89d1767c992b7841d035 (diff) | |
| download | emacs-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/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/find-cmd.el | 32 |
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 @@ | |||
| 1 | 2009-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 | |||
| 1 | 2009-12-17 Juri Linkov <juri@jurta.org> | 9 | 2009-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. |
| 124 | alist is the name. The cdr is minimum args, the function used | 124 | The car of each alist is the name. The cdr is minimum args, the |
| 125 | to join many occurences of the argument together, and whether or | 125 | function used to join many occurences of the argument together, |
| 126 | not to leave quotes off the string (non-nil means the string will | 126 | and whether or not to leave quotes off the string (non-nil means |
| 127 | be quoted).") | 127 | the 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. |
| 132 | For 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 |
| 139 | result is a string that should be ready for the command line." | 140 | result 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\"\) |
| 184 | will produce (unwrapped): | 185 | will 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. |
| 194 | form. OPTION is the name of the form, OPER is the function used | 195 | OPTION is the name of the form, OPER is the function used to either |
| 195 | to either OR or AND multiple results together. ARGCOUNT is the | 196 | OR or AND multiple results together. ARGCOUNT is the minimum of |
| 196 | minimum of args that OPTION can receive and ARGS are the | 197 | args that OPTION can receive and ARGS are the arguments for OPTION. |
| 197 | arguments for OPTION." | 198 | If DONT-QUOTE is non-nil, arguments are quoted for passing them to |
| 199 | the 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 |
| 214 | them into valid switches. The result is -and(ed) together." | 216 | them 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))) |