(+ 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)
(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))
(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)
)
)
(provide 'locate)
+;;; arch-tag: 60c4d098-b5d5-4b3c-a3e0-51a2e9f43898
;;; locate.el ends here