diff options
| author | Juanma Barranquero | 2007-10-15 17:24:36 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2007-10-15 17:24:36 +0000 |
| commit | 095aa9cdf01b4994db40f344e12f392f5635912d (patch) | |
| tree | ca3de0bc388eba4d15bd0c61e46573806f25d001 | |
| parent | 78205dab16ac571debda4d869322aca8ccab021b (diff) | |
| download | emacs-095aa9cdf01b4994db40f344e12f392f5635912d.tar.gz emacs-095aa9cdf01b4994db40f344e12f392f5635912d.zip | |
(filesets-alist-get): Use `let' rather than `let*'.
(filesets-ormap, filesets-sort-case-sensitive-flag, filesets-remake-shortcut,
filesets-ingroup-collect-files): Fix typos in docstrings.
(filesets-conditional-sort, filesets-find-or-display-file,
filesets-data-get-name, filesets-data-get-data, filesets-data-set,
filesets-cmd-query-replace-getargs, filesets-ingroup-collect): Doc fixes.
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/filesets.el | 41 |
2 files changed, 30 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a9d6c2b29a6..e4b5fc84b94 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2007-10-15 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * filesets.el (filesets-alist-get): Use `let' rather than `let*'. | ||
| 4 | (filesets-ormap, filesets-sort-case-sensitive-flag) | ||
| 5 | (filesets-remake-shortcut, filesets-ingroup-collect-files): | ||
| 6 | Fix typos in docstrings. | ||
| 7 | (filesets-conditional-sort, filesets-find-or-display-file) | ||
| 8 | (filesets-data-get-name, filesets-data-get-data) | ||
| 9 | (filesets-data-set, filesets-cmd-query-replace-getargs) | ||
| 10 | (filesets-ingroup-collect): Doc fixes. | ||
| 11 | |||
| 1 | 2007-10-15 Sam Steingold <sds@gnu.org> | 12 | 2007-10-15 Sam Steingold <sds@gnu.org> |
| 2 | 13 | ||
| 3 | * mail/sendmail.el (sendmail-error-reporting-interactive) | 14 | * mail/sendmail.el (sendmail-error-reporting-interactive) |
diff --git a/lisp/filesets.el b/lisp/filesets.el index e5dde847853..d7a7dc9efa0 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el | |||
| @@ -158,7 +158,7 @@ COND-FN takes one argument: the current element." | |||
| 158 | (setq rv (append rv (list elt))))))) | 158 | (setq rv (append rv (list elt))))))) |
| 159 | 159 | ||
| 160 | (defun filesets-ormap (fsom-pred lst) | 160 | (defun filesets-ormap (fsom-pred lst) |
| 161 | "Return the tail of FSOM-LST for the head of which FSOM-PRED is non-nil." | 161 | "Return the tail of LST for the head of which FSOM-PRED is non-nil." |
| 162 | (let ((fsom-lst lst) | 162 | (let ((fsom-lst lst) |
| 163 | (fsom-rv nil)) | 163 | (fsom-rv nil)) |
| 164 | (while (and (not (null fsom-lst)) | 164 | (while (and (not (null fsom-lst)) |
| @@ -535,7 +535,7 @@ computer environments." | |||
| 535 | :group 'filesets) | 535 | :group 'filesets) |
| 536 | 536 | ||
| 537 | (defcustom filesets-sort-case-sensitive-flag t | 537 | (defcustom filesets-sort-case-sensitive-flag t |
| 538 | "Non-nil means sorting of the filesete menu is case sensitive." | 538 | "Non-nil means sorting of the filesets menu is case sensitive." |
| 539 | :set (function filesets-set-default) | 539 | :set (function filesets-set-default) |
| 540 | :type 'boolean | 540 | :type 'boolean |
| 541 | :group 'filesets) | 541 | :group 'filesets) |
| @@ -1091,10 +1091,7 @@ If NEGATIVE is non-nil, remove all directory names." | |||
| 1091 | "Return a sorted copy of LST, LST being a list of strings. | 1091 | "Return a sorted copy of LST, LST being a list of strings. |
| 1092 | If `filesets-sort-menu-flag' is nil, return LST itself. | 1092 | If `filesets-sort-menu-flag' is nil, return LST itself. |
| 1093 | 1093 | ||
| 1094 | ACCESS-FN ... function to get the string value of LST's elements. | 1094 | ACCESS-FN ... function to get the string value of LST's elements." |
| 1095 | |||
| 1096 | If SIMPLY-DO-IT is non-nil, the list is sorted regardless of | ||
| 1097 | `filesets-sort-menu-flag'." | ||
| 1098 | (if filesets-sort-menu-flag | 1095 | (if filesets-sort-menu-flag |
| 1099 | (let* ((fni (or access-fn | 1096 | (let* ((fni (or access-fn |
| 1100 | (function identity))) | 1097 | (function identity))) |
| @@ -1363,7 +1360,7 @@ not be opened." | |||
| 1363 | (find-file file))) | 1360 | (find-file file))) |
| 1364 | 1361 | ||
| 1365 | (defun filesets-find-or-display-file (&optional file viewer) | 1362 | (defun filesets-find-or-display-file (&optional file viewer) |
| 1366 | "Visit FILE using an external viewer or open it in an Emacs buffer." | 1363 | "Visit FILE using an external VIEWER or open it in an Emacs buffer." |
| 1367 | (interactive) | 1364 | (interactive) |
| 1368 | (let* ((file (or file | 1365 | (let* ((file (or file |
| 1369 | (read-file-name "Find file: " nil nil viewer))) | 1366 | (read-file-name "Find file: " nil nil viewer))) |
| @@ -1414,24 +1411,24 @@ not be opened." | |||
| 1414 | something))) | 1411 | something))) |
| 1415 | 1412 | ||
| 1416 | (defun filesets-data-get-name (entry) | 1413 | (defun filesets-data-get-name (entry) |
| 1417 | "Access to `filesets-data'. Get the entry's name." | 1414 | "Access to `filesets-data'. Get the ENTRY's name." |
| 1418 | (car entry)) | 1415 | (car entry)) |
| 1419 | 1416 | ||
| 1420 | (defun filesets-data-get-data (entry) | 1417 | (defun filesets-data-get-data (entry) |
| 1421 | "Access to `filesets-data'. Get the entry's data section." | 1418 | "Access to `filesets-data'. Get the ENTRY's data section." |
| 1422 | (cdr entry)) | 1419 | (cdr entry)) |
| 1423 | 1420 | ||
| 1424 | (defun filesets-alist-get (alist key &optional default carp) | 1421 | (defun filesets-alist-get (alist key &optional default carp) |
| 1425 | "Get KEY's value in the association list ALIST. | 1422 | "Get KEY's value in the association list ALIST. |
| 1426 | Return DEFAULT if not found. Return (car VALUE) if CARP is non-nil." | 1423 | Return DEFAULT if not found. Return (car VALUE) if CARP is non-nil." |
| 1427 | (let* ((elt (assoc key alist))) | 1424 | (let ((elt (assoc key alist))) |
| 1428 | (cond | 1425 | (cond |
| 1429 | (elt | 1426 | (elt |
| 1430 | (if carp | 1427 | (if carp |
| 1431 | (cadr elt) | 1428 | (cadr elt) |
| 1432 | (cdr elt))) | 1429 | (cdr elt))) |
| 1433 | (default default) | 1430 | (default default) |
| 1434 | (t nil)))) | 1431 | (t nil)))) |
| 1435 | 1432 | ||
| 1436 | (defun filesets-data-get (entry key &optional default carp) | 1433 | (defun filesets-data-get (entry key &optional default carp) |
| 1437 | "Extract the value for KEY in the data part of fileset ENTRY. | 1434 | "Extract the value for KEY in the data part of fileset ENTRY. |
| @@ -1439,7 +1436,7 @@ Return DEFAULT if not found. Return (car VALUE) if CARP is non-nil." | |||
| 1439 | (filesets-alist-get (filesets-data-get-data entry) key default carp)) | 1436 | (filesets-alist-get (filesets-data-get-data entry) key default carp)) |
| 1440 | 1437 | ||
| 1441 | (defun filesets-data-set (entry key value) | 1438 | (defun filesets-data-set (entry key value) |
| 1442 | "Set the value for KEY in the data part of fileset ENTRY." | 1439 | "Set the VALUE for KEY in the data part of fileset ENTRY." |
| 1443 | (let* ((alist (filesets-data-get-data entry)) | 1440 | (let* ((alist (filesets-data-get-data entry)) |
| 1444 | (elt (assoc key alist))) | 1441 | (elt (assoc key alist))) |
| 1445 | (if elt | 1442 | (if elt |
| @@ -1666,9 +1663,9 @@ Replace <file-name> or <<file-name>> with filename." | |||
| 1666 | filesets-commands))) | 1663 | filesets-commands))) |
| 1667 | 1664 | ||
| 1668 | 1665 | ||
| 1669 | ;;; sampe commands | 1666 | ;;; sample commands |
| 1670 | (defun filesets-cmd-query-replace-getargs () | 1667 | (defun filesets-cmd-query-replace-getargs () |
| 1671 | "Get arguments for `filesets-cmd-query-replace'." | 1668 | "Get arguments for `query-replace' and `query-replace-regexp'." |
| 1672 | (let* ((from-string (read-string "Filesets query replace: " | 1669 | (let* ((from-string (read-string "Filesets query replace: " |
| 1673 | "" | 1670 | "" |
| 1674 | 'query-replace-history)) | 1671 | 'query-replace-history)) |
| @@ -1875,7 +1872,7 @@ User will be queried, if no fileset name is provided." | |||
| 1875 | (browse-url filesets-homepage)) | 1872 | (browse-url filesets-homepage)) |
| 1876 | 1873 | ||
| 1877 | (defun filesets-remake-shortcut (count submenu) | 1874 | (defun filesets-remake-shortcut (count submenu) |
| 1878 | "Remake a submenus shortcut when wrapping long menus." | 1875 | "Remake a submenu's shortcut when wrapping long menus." |
| 1879 | (let* ((name (concat (filesets-get-shortcut count) | 1876 | (let* ((name (concat (filesets-get-shortcut count) |
| 1880 | (substring (elt submenu 0) 2)))) | 1877 | (substring (elt submenu 0) 2)))) |
| 1881 | (if (listp submenu) | 1878 | (if (listp submenu) |
| @@ -2032,7 +2029,7 @@ LOOKUP-NAME is used as lookup name for retrieving fileset specific settings." | |||
| 2032 | (lax-plist-put filesets-ingroup-cache emaster this)))) | 2029 | (lax-plist-put filesets-ingroup-cache emaster this)))) |
| 2033 | 2030 | ||
| 2034 | (defun filesets-ingroup-collect-files (fs &optional remdupl-flag master depth) | 2031 | (defun filesets-ingroup-collect-files (fs &optional remdupl-flag master depth) |
| 2035 | "Helper function for `filesets-ingroup-collect'. Collect file names." | 2032 | "Helper function for `filesets-ingroup-collect'. Collect file names." |
| 2036 | (let* ((master (or master | 2033 | (let* ((master (or master |
| 2037 | (filesets-entry-get-master fs))) | 2034 | (filesets-entry-get-master fs))) |
| 2038 | (remdupl-flag (or remdupl-flag | 2035 | (remdupl-flag (or remdupl-flag |
| @@ -2146,7 +2143,7 @@ FS is a fileset's name. FLIST is a list returned by | |||
| 2146 | `([,nm (filesets-file-open nil ',master ',fsn)]))))))))) | 2143 | `([,nm (filesets-file-open nil ',master ',fsn)]))))))))) |
| 2147 | 2144 | ||
| 2148 | (defun filesets-ingroup-collect (fs remdupl-flag master) | 2145 | (defun filesets-ingroup-collect (fs remdupl-flag master) |
| 2149 | "Collect names of included files & build submenu." | 2146 | "Collect names of included files and build submenu." |
| 2150 | (filesets-ingroup-cache-put master nil) | 2147 | (filesets-ingroup-cache-put master nil) |
| 2151 | (filesets-message 2 "Filesets: parsing %S" master) | 2148 | (filesets-message 2 "Filesets: parsing %S" master) |
| 2152 | (filesets-ingroup-collect-build-menu | 2149 | (filesets-ingroup-collect-build-menu |