diff options
| author | Juanma Barranquero | 2008-10-15 15:32:21 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2008-10-15 15:32:21 +0000 |
| commit | 0c69125233377bcca90fc7fca5ed5d7db7010937 (patch) | |
| tree | a053f323e6422b962189d98694610a7f750fb40f | |
| parent | 52441368d6fec82d39b657899bda401b7b854176 (diff) | |
| download | emacs-0c69125233377bcca90fc7fca5ed5d7db7010937.tar.gz emacs-0c69125233377bcca90fc7fca5ed5d7db7010937.zip | |
* find-file.el (ff-get-file): Doc fix.
(ff-get-file-name): Use `let', not `let*'.
(ff-search-directories): Fix typo in docstring.
(ff-pre-find-hook, ff-pre-load-hook, ff-post-load-hook)
(ff-not-found-hook, ff-file-created-hook, ff-case-fold-search)
(ff-always-in-other-window, ff-ignore-include, ff-always-try-to-create)
(ff-quiet-mode, ff-other-file-alist, cc-search-directories)
(cc-other-file-alist, modula2-other-file-alist):
Remove spurious * in docstrings.
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/find-file.el | 56 |
2 files changed, 40 insertions, 28 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e2aba3c0056..cc88b08cb5b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2008-10-15 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * find-file.el (ff-get-file): Doc fix. | ||
| 4 | (ff-get-file-name): Use `let', not `let*'. | ||
| 5 | (ff-search-directories): Fix typo in docstring. | ||
| 6 | (ff-pre-find-hook, ff-pre-load-hook, ff-post-load-hook) | ||
| 7 | (ff-not-found-hook, ff-file-created-hook, ff-case-fold-search) | ||
| 8 | (ff-always-in-other-window, ff-ignore-include, ff-always-try-to-create) | ||
| 9 | (ff-quiet-mode, ff-other-file-alist, cc-search-directories) | ||
| 10 | (cc-other-file-alist, modula2-other-file-alist): | ||
| 11 | Remove spurious * in docstrings. | ||
| 12 | |||
| 1 | 2008-10-14 Chong Yidong <cyd@stupidchicken.com> | 13 | 2008-10-14 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 14 | ||
| 3 | * faces.el (set-face-attribute): Set family and foundry before | 15 | * faces.el (set-face-attribute): Set family and foundry before |
diff --git a/lisp/find-file.el b/lisp/find-file.el index a3b4272fe72..0ad32989090 100644 --- a/lisp/find-file.el +++ b/lisp/find-file.el | |||
| @@ -130,54 +130,54 @@ | |||
| 130 | :group 'find-file) | 130 | :group 'find-file) |
| 131 | 131 | ||
| 132 | (defcustom ff-pre-find-hook nil | 132 | (defcustom ff-pre-find-hook nil |
| 133 | "*List of functions to be called before the search for the file starts." | 133 | "List of functions to be called before the search for the file starts." |
| 134 | :type 'hook | 134 | :type 'hook |
| 135 | :group 'ff) | 135 | :group 'ff) |
| 136 | 136 | ||
| 137 | (defcustom ff-pre-load-hook nil | 137 | (defcustom ff-pre-load-hook nil |
| 138 | "*List of functions to be called before the other file is loaded." | 138 | "List of functions to be called before the other file is loaded." |
| 139 | :type 'hook | 139 | :type 'hook |
| 140 | :group 'ff) | 140 | :group 'ff) |
| 141 | 141 | ||
| 142 | (defcustom ff-post-load-hook nil | 142 | (defcustom ff-post-load-hook nil |
| 143 | "*List of functions to be called after the other file is loaded." | 143 | "List of functions to be called after the other file is loaded." |
| 144 | :type 'hook | 144 | :type 'hook |
| 145 | :group 'ff) | 145 | :group 'ff) |
| 146 | 146 | ||
| 147 | (defcustom ff-not-found-hook nil | 147 | (defcustom ff-not-found-hook nil |
| 148 | "*List of functions to be called if the other file could not be found." | 148 | "List of functions to be called if the other file could not be found." |
| 149 | :type 'hook | 149 | :type 'hook |
| 150 | :group 'ff) | 150 | :group 'ff) |
| 151 | 151 | ||
| 152 | (defcustom ff-file-created-hook nil | 152 | (defcustom ff-file-created-hook nil |
| 153 | "*List of functions to be called if the other file needs to be created." | 153 | "List of functions to be called if the other file needs to be created." |
| 154 | :type 'hook | 154 | :type 'hook |
| 155 | :group 'ff) | 155 | :group 'ff) |
| 156 | 156 | ||
| 157 | (defcustom ff-case-fold-search nil | 157 | (defcustom ff-case-fold-search nil |
| 158 | "*Non-nil means ignore cases in matches (see `case-fold-search'). | 158 | "Non-nil means ignore cases in matches (see `case-fold-search'). |
| 159 | If you have extensions in different cases, you will want this to be nil." | 159 | If you have extensions in different cases, you will want this to be nil." |
| 160 | :type 'boolean | 160 | :type 'boolean |
| 161 | :group 'ff) | 161 | :group 'ff) |
| 162 | 162 | ||
| 163 | (defcustom ff-always-in-other-window nil | 163 | (defcustom ff-always-in-other-window nil |
| 164 | "*If non-nil, find the corresponding file in another window by default. | 164 | "If non-nil, find the corresponding file in another window by default. |
| 165 | To override this, give an argument to `ff-find-other-file'." | 165 | To override this, give an argument to `ff-find-other-file'." |
| 166 | :type 'boolean | 166 | :type 'boolean |
| 167 | :group 'ff) | 167 | :group 'ff) |
| 168 | 168 | ||
| 169 | (defcustom ff-ignore-include nil | 169 | (defcustom ff-ignore-include nil |
| 170 | "*If non-nil, ignore `#include' lines." | 170 | "If non-nil, ignore `#include' lines." |
| 171 | :type 'boolean | 171 | :type 'boolean |
| 172 | :group 'ff) | 172 | :group 'ff) |
| 173 | 173 | ||
| 174 | (defcustom ff-always-try-to-create t | 174 | (defcustom ff-always-try-to-create t |
| 175 | "*If non-nil, always attempt to create the other file if it was not found." | 175 | "If non-nil, always attempt to create the other file if it was not found." |
| 176 | :type 'boolean | 176 | :type 'boolean |
| 177 | :group 'ff) | 177 | :group 'ff) |
| 178 | 178 | ||
| 179 | (defcustom ff-quiet-mode nil | 179 | (defcustom ff-quiet-mode nil |
| 180 | "*If non-nil, trace which directories are being searched." | 180 | "If non-nil, trace which directories are being searched." |
| 181 | :type 'boolean | 181 | :type 'boolean |
| 182 | :group 'ff) | 182 | :group 'ff) |
| 183 | 183 | ||
| @@ -200,7 +200,7 @@ filename that EXTRACT returned.") | |||
| 200 | 200 | ||
| 201 | (defvaralias 'ff-related-file-alist 'ff-other-file-alist) | 201 | (defvaralias 'ff-related-file-alist 'ff-other-file-alist) |
| 202 | (defcustom ff-other-file-alist 'cc-other-file-alist | 202 | (defcustom ff-other-file-alist 'cc-other-file-alist |
| 203 | "*Alist of extensions to find given the current file's extension. | 203 | "Alist of extensions to find given the current file's extension. |
| 204 | 204 | ||
| 205 | This list should contain the most used extensions before the others, | 205 | This list should contain the most used extensions before the others, |
| 206 | since the search algorithm searches sequentially through each | 206 | since the search algorithm searches sequentially through each |
| @@ -212,7 +212,7 @@ This alist should be set by the major mode." | |||
| 212 | :group 'ff) | 212 | :group 'ff) |
| 213 | 213 | ||
| 214 | (defcustom ff-search-directories 'cc-search-directories | 214 | (defcustom ff-search-directories 'cc-search-directories |
| 215 | "*List of directories to search for a specific file. | 215 | "List of directories to search for a specific file. |
| 216 | 216 | ||
| 217 | Set by default to `cc-search-directories', expanded at run-time. | 217 | Set by default to `cc-search-directories', expanded at run-time. |
| 218 | 218 | ||
| @@ -226,7 +226,7 @@ A typical format is | |||
| 226 | '(\".\" \"/usr/include\" \"$PROJECT/*/include\") | 226 | '(\".\" \"/usr/include\" \"$PROJECT/*/include\") |
| 227 | 227 | ||
| 228 | Environment variables can be inserted between slashes (`/'). | 228 | Environment variables can be inserted between slashes (`/'). |
| 229 | They will be replaced by their definition. If a variable does | 229 | They will be replaced by their definition. If a variable does |
| 230 | not exist, it is replaced (silently) with an empty string. | 230 | not exist, it is replaced (silently) with an empty string. |
| 231 | 231 | ||
| 232 | The stars are *not* wildcards: they are searched for together with | 232 | The stars are *not* wildcards: they are searched for together with |
| @@ -237,7 +237,7 @@ the preceding slash. The star represents all the subdirectories except | |||
| 237 | 237 | ||
| 238 | (defcustom cc-search-directories | 238 | (defcustom cc-search-directories |
| 239 | '("." "/usr/include" "/usr/local/include/*") | 239 | '("." "/usr/include" "/usr/local/include/*") |
| 240 | "*See the description of the `ff-search-directories' variable." | 240 | "See the description of the `ff-search-directories' variable." |
| 241 | :type '(repeat directory) | 241 | :type '(repeat directory) |
| 242 | :group 'ff) | 242 | :group 'ff) |
| 243 | 243 | ||
| @@ -262,7 +262,7 @@ the preceding slash. The star represents all the subdirectories except | |||
| 262 | 262 | ||
| 263 | ("\\.cxx\\'" (".hxx" ".hh" ".h")) | 263 | ("\\.cxx\\'" (".hxx" ".hh" ".h")) |
| 264 | ("\\.hxx\\'" (".cxx"))) | 264 | ("\\.hxx\\'" (".cxx"))) |
| 265 | "*Alist of extensions to find given the current file's extension. | 265 | "Alist of extensions to find given the current file's extension. |
| 266 | 266 | ||
| 267 | This list should contain the most used extensions before the others, | 267 | This list should contain the most used extensions before the others, |
| 268 | since the search algorithm searches sequentially through each directory | 268 | since the search algorithm searches sequentially through each directory |
| @@ -276,7 +276,7 @@ is created with the first matching extension (`.cc' yields `.hh')." | |||
| 276 | ("\\.mi$" (".md")) ;; Modula-2 module definition | 276 | ("\\.mi$" (".md")) ;; Modula-2 module definition |
| 277 | ("\\.md$" (".mi")) ;; and implementation. | 277 | ("\\.md$" (".mi")) ;; and implementation. |
| 278 | ) | 278 | ) |
| 279 | "*See the description for the `ff-search-directories' variable." | 279 | "See the description for the `ff-search-directories' variable." |
| 280 | :type '(repeat (list regexp (choice (repeat string) function))) | 280 | :type '(repeat (list regexp (choice (repeat string) function))) |
| 281 | :group 'ff) | 281 | :group 'ff) |
| 282 | 282 | ||
| @@ -611,8 +611,8 @@ the `ff-ignore-include' variable." | |||
| 611 | 611 | ||
| 612 | (defun ff-get-file (search-dirs filename &optional suffix-list other-window) | 612 | (defun ff-get-file (search-dirs filename &optional suffix-list other-window) |
| 613 | "Find a file in the SEARCH-DIRS with the given FILENAME (or filename stub). | 613 | "Find a file in the SEARCH-DIRS with the given FILENAME (or filename stub). |
| 614 | If (optional) SUFFIX-LIST is nil, search for fname, otherwise search | 614 | If (optional) SUFFIX-LIST is nil, search for FILENAME, otherwise search |
| 615 | for fname with each of the given suffixes. Get the file or the buffer | 615 | for FILENAME with each of the given suffixes. Get the file or the buffer |
| 616 | corresponding to the name of the first file found, or nil." | 616 | corresponding to the name of the first file found, or nil." |
| 617 | (let ((filename (ff-get-file-name search-dirs filename suffix-list))) | 617 | (let ((filename (ff-get-file-name search-dirs filename suffix-list))) |
| 618 | 618 | ||
| @@ -636,16 +636,16 @@ corresponding to the name of the first file found, or nil." | |||
| 636 | If (optional) SUFFIX-LIST is nil, search for FNAME-STUB, otherwise | 636 | If (optional) SUFFIX-LIST is nil, search for FNAME-STUB, otherwise |
| 637 | search for FNAME-STUB with each of the given suffixes. Return the | 637 | search for FNAME-STUB with each of the given suffixes. Return the |
| 638 | name of the first file found." | 638 | name of the first file found." |
| 639 | (let* (dirs ;; working copy of dirs to search | 639 | (let (dirs ;; working copy of dirs to search |
| 640 | dir ;; the current dir considered | 640 | dir ;; the current dir considered |
| 641 | file ;; filename being looked for | 641 | file ;; filename being looked for |
| 642 | rest ;; pathname after first /* | 642 | rest ;; pathname after first /* |
| 643 | this-suffix ;; the suffix we are currently considering | 643 | this-suffix ;; the suffix we are currently considering |
| 644 | suffixes ;; working copy of suffix-list | 644 | suffixes ;; working copy of suffix-list |
| 645 | filename ;; built filename | 645 | filename ;; built filename |
| 646 | blist ;; list of live buffers | 646 | blist ;; list of live buffers |
| 647 | buf ;; current buffer in blist | 647 | buf ;; current buffer in blist |
| 648 | found) ;; whether we have found anything | 648 | found) ;; whether we have found anything |
| 649 | 649 | ||
| 650 | (setq suffixes suffix-list) | 650 | (setq suffixes suffix-list) |
| 651 | 651 | ||