Commit fe8c7212 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(locate): Show default locate pattern within the

prompt, but don't insert it into the minibuffer contents.  Catch
the case when pattern is the empty string.
parent a5e6715c
2001-11-17 Stephen Eglen <stephen@gnu.org>
* locate.el (locate): Show default locate pattern within the
prompt, but don't insert it into the minibuffer contents. Catch
the case when pattern is the empty string.
2001-11-17 Eli Zaretskii <eliz@is.elta.co.il>
 
* language/european.el ("French"): New language environment.
......
......@@ -199,11 +199,18 @@ With prefix arg, prompt for the locate command to run."
(mapconcat 'identity (cdr locate-cmd) " "))
(+ 2 (length (car locate-cmd))))
nil nil 'locate-history-list))
(read-from-minibuffer
"Locate: "
(locate-word-at-point)
nil nil 'locate-history-list)
)))
(let* ((default (locate-word-at-point))
(input
(read-from-minibuffer
(if (> (length default) 0)
(format "Locate (default `%s'): " default)
(format "Locate: "))
nil nil nil 'locate-history-list default t)))
(and (equal input "") default
(setq input default))
input))))
(if (equal search-string "")
(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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment