Trailing whitespace deleted.
[bpt/emacs.git] / lisp / locate.el
index 6d5967a..40e8ddc 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)
     )
   )