diff options
author | Juri Linkov <juri@jurta.org> | 2013-12-20 21:55:56 +0200 |
---|---|---|
committer | Juri Linkov <juri@jurta.org> | 2013-12-20 21:55:56 +0200 |
commit | 24da72738b54b7a247bf14dd704166056af815bf (patch) | |
tree | 82446586b7b6464e20727d1bf8335697c086b841 /lisp/progmodes/grep.el | |
parent | 137f57c81e368013e62fcd6f0c6489e6363f65e7 (diff) | |
download | emacs-24da72738b54b7a247bf14dd704166056af815bf.tar.gz |
* lisp/replace.el (read-regexp-defaults-function): New defcustom.
(read-regexp-suggestions): New function.
(read-regexp): Use `read-regexp-defaults-function' to get default values.
Use `read-regexp-suggestions'. Add non-empty default to history
for empty input.
(occur-read-regexp-defaults-function): Remove function.
(occur-read-primary-args): Use `regexp-history-last' instead of
`occur-read-regexp-defaults-function'.
* lisp/hi-lock.el (hi-lock-read-regexp-defaults-function): Remove function.
(hi-lock-line-face-buffer, hi-lock-face-buffer)
(hi-lock-face-phrase-buffer): Use `regexp-history-last' instead of
`hi-lock-read-regexp-defaults-function'. Doc fix.
(hi-lock-face-symbol-at-point): Replace `find-tag-default-as-regexp'
with `find-tag-default-as-symbol-regexp'. Doc fix.
(hi-lock-read-regexp-defaults): Remove function.
(hi-lock-regexp-okay): Add check for null.
* lisp/progmodes/grep.el (grep-read-regexp): Use `grep-tag-default' for
the arg DEFAULTS. Move formatting of the prompt to `read-regexp'.
* lisp/subr.el (find-tag-default-as-symbol-regexp): New function.
(find-tag-default-as-regexp): Move symbol regexp formatting to
`find-tag-default-as-symbol-regexp'.
Fixes: debbugs:14405
Diffstat (limited to 'lisp/progmodes/grep.el')
-rw-r--r-- | lisp/progmodes/grep.el | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index e63e29df37d..ed443bee640 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -819,12 +819,7 @@ substitution string. Note dynamic scoping of variables.") (defun grep-read-regexp () "Read regexp arg for interactive grep." - (let ((default (grep-tag-default))) - (read-regexp - (concat "Search for" - (if (and default (> (length default) 0)) - (format " (default \"%s\"): " default) ": ")) - default 'grep-regexp-history))) + (read-regexp "Search for" 'grep-tag-default 'grep-regexp-history)) (defun grep-read-files (regexp) "Read files arg for interactive grep." |