diff options
| author | Glenn Morris | 2010-10-31 23:55:49 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-10-31 23:55:49 -0700 |
| commit | cb5e49a301339b95b997a554381e60a4d2824ae7 (patch) | |
| tree | ee1eec188293b401a8ad6e978e6c906ef4f84bc4 | |
| parent | 381d186f82544c7c34478badef209f52feacd80f (diff) | |
| download | emacs-cb5e49a301339b95b997a554381e60a4d2824ae7.tar.gz emacs-cb5e49a301339b95b997a554381e60a4d2824ae7.zip | |
* lisp/locate.el (locate, locate-mode): Doc fixes.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/locate.el | 17 |
2 files changed, 11 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bc43863e6b4..8591e2171f3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-11-01 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * locate.el (locate, locate-mode): Doc fixes. | ||
| 4 | |||
| 1 | 2010-11-01 Chong Yidong <cyd@stupidchicken.com> | 5 | 2010-11-01 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 6 | ||
| 3 | * server.el (server-start): New arg INHIBIT-PROMPT prevents asking | 7 | * server.el (server-start): New arg INHIBIT-PROMPT prevents asking |
diff --git a/lisp/locate.el b/lisp/locate.el index d0021dfed22..ce1154c9739 100644 --- a/lisp/locate.el +++ b/lisp/locate.el | |||
| @@ -270,7 +270,7 @@ that is, with a prefix arg, you get the default behavior." | |||
| 270 | (defun locate (search-string &optional filter arg) | 270 | (defun locate (search-string &optional filter arg) |
| 271 | "Run the program `locate', putting results in `*Locate*' buffer. | 271 | "Run the program `locate', putting results in `*Locate*' buffer. |
| 272 | Pass it SEARCH-STRING as argument. Interactively, prompt for SEARCH-STRING. | 272 | Pass it SEARCH-STRING as argument. Interactively, prompt for SEARCH-STRING. |
| 273 | With prefix arg, prompt for the exact shell command to run instead. | 273 | With prefix arg ARG, prompt for the exact shell command to run instead. |
| 274 | 274 | ||
| 275 | This program searches for those file names in a database that match | 275 | This program searches for those file names in a database that match |
| 276 | SEARCH-STRING and normally outputs all matching absolute file names, | 276 | SEARCH-STRING and normally outputs all matching absolute file names, |
| @@ -286,7 +286,8 @@ the variables `locate-command' or `locate-make-command-line'. | |||
| 286 | The main use of FILTER is to implement `locate-with-filter'. See | 286 | The main use of FILTER is to implement `locate-with-filter'. See |
| 287 | the docstring of that function for its meaning. | 287 | the docstring of that function for its meaning. |
| 288 | 288 | ||
| 289 | ARG is the interactive prefix arg." | 289 | After preparing the results buffer, this runs `dired-mode-hook' and |
| 290 | then `locate-post-command-hook'." | ||
| 290 | (interactive | 291 | (interactive |
| 291 | (list | 292 | (list |
| 292 | (locate-prompt-for-search-string) | 293 | (locate-prompt-for-search-string) |
| @@ -300,8 +301,7 @@ ARG is the interactive prefix arg." | |||
| 300 | (locate-cmd-args (cdr locate-cmd-list)) | 301 | (locate-cmd-args (cdr locate-cmd-list)) |
| 301 | (run-locate-command | 302 | (run-locate-command |
| 302 | (or (and arg (not locate-prompt-for-command)) | 303 | (or (and arg (not locate-prompt-for-command)) |
| 303 | (and (not arg) locate-prompt-for-command))) | 304 | (and (not arg) locate-prompt-for-command)))) |
| 304 | ) | ||
| 305 | 305 | ||
| 306 | ;; Find the Locate buffer | 306 | ;; Find the Locate buffer |
| 307 | (save-window-excursion | 307 | (save-window-excursion |
| @@ -323,16 +323,13 @@ ARG is the interactive prefix arg." | |||
| 323 | (and filter | 323 | (and filter |
| 324 | (locate-filter-output filter)) | 324 | (locate-filter-output filter)) |
| 325 | 325 | ||
| 326 | (locate-do-setup search-string) | 326 | (locate-do-setup search-string))) |
| 327 | )) | ||
| 328 | (and (not (string-equal (buffer-name) locate-buffer-name)) | 327 | (and (not (string-equal (buffer-name) locate-buffer-name)) |
| 329 | (switch-to-buffer-other-window locate-buffer-name)) | 328 | (switch-to-buffer-other-window locate-buffer-name)) |
| 330 | 329 | ||
| 331 | (run-hooks 'dired-mode-hook) | 330 | (run-hooks 'dired-mode-hook) |
| 332 | (dired-next-line 3) ;move to first matching file. | 331 | (dired-next-line 3) ;move to first matching file. |
| 333 | (run-hooks 'locate-post-command-hook) | 332 | (run-hooks 'locate-post-command-hook))) |
| 334 | ) | ||
| 335 | ) | ||
| 336 | 333 | ||
| 337 | ;;;###autoload | 334 | ;;;###autoload |
| 338 | (defun locate-with-filter (search-string filter &optional arg) | 335 | (defun locate-with-filter (search-string filter &optional arg) |
| @@ -447,6 +444,7 @@ file name or is inside a subdirectory." | |||
| 447 | \\<locate-mode-map>\ | 444 | \\<locate-mode-map>\ |
| 448 | In that buffer, you can use almost all the usual dired bindings. | 445 | In that buffer, you can use almost all the usual dired bindings. |
| 449 | \\[locate-find-directory] visits the directory of the file on the current line. | 446 | \\[locate-find-directory] visits the directory of the file on the current line. |
| 447 | This function runs `locate-mode-hook' before returning. | ||
| 450 | 448 | ||
| 451 | Operating on listed files works, but does not always | 449 | Operating on listed files works, but does not always |
| 452 | automatically update the buffer as in ordinary Dired. | 450 | automatically update the buffer as in ordinary Dired. |
| @@ -687,5 +685,4 @@ the database on the command line." | |||
| 687 | 685 | ||
| 688 | (provide 'locate) | 686 | (provide 'locate) |
| 689 | 687 | ||
| 690 | ;; arch-tag: 60c4d098-b5d5-4b3c-a3e0-51a2e9f43898 | ||
| 691 | ;;; locate.el ends here | 688 | ;;; locate.el ends here |