]> code.delx.au - gnu-emacs/blobdiff - lisp/locate.el
(choose-completion-string): Use `minibufferp';
[gnu-emacs] / lisp / locate.el
index 6d5967a57508c054fb440d81c864b71b173d20e5..40e8ddc65c38560fc34d0ecd91a717907472fc31 100644 (file)
@@ -200,7 +200,7 @@ With prefix arg, prompt for the locate command to run."
                       (+ 2 (length (car locate-cmd))))
              nil nil 'locate-history-list))
         (let* ((default (locate-word-at-point))
-              (input 
+              (input
                (read-from-minibuffer
                 (if  (> (length default) 0)
                     (format "Locate (default `%s'): " default)
@@ -210,7 +210,7 @@ With prefix arg, prompt for the locate command to run."
                    (setq input default))
               input))))
   (if (equal search-string "")
-      (error "Please specify a filename to search for."))
+      (error "Please specify a filename to search for"))
   (let* ((locate-cmd-list (funcall locate-make-command-line search-string))
         (locate-cmd (car locate-cmd-list))
         (locate-cmd-args (cdr locate-cmd-list))
@@ -240,6 +240,7 @@ With prefix arg, prompt for the locate command to run."
        (switch-to-buffer-other-window locate-buffer-name))
 
     (run-hooks 'dired-mode-hook)
+    (dired-next-line 2)                        ;move to first matching file.
     (run-hooks 'locate-post-command-hook)
     )
   )