+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.
(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))