mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
(read-regexp): Return empty string when `default-value' is nil.
(keep-lines-read-args): Don't use empty string as the default value for `read-regexp'. (Bug#2495)
This commit is contained in:
parent
770f36f8bd
commit
99910cf46a
2 changed files with 12 additions and 2 deletions
|
|
@ -1,3 +1,13 @@
|
|||
2009-08-12 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* progmodes/grep.el (lgrep): Ensure that `default-directory' is
|
||||
always non-nil. (Bug#4052)
|
||||
|
||||
* replace.el (read-regexp): Return empty string when
|
||||
`default-value' is nil.
|
||||
(keep-lines-read-args): Don't use empty string as the
|
||||
default value for `read-regexp'. (Bug#2495)
|
||||
|
||||
2009-08-12 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* international/mule-cmds.el (ucs-insert): Change arguments
|
||||
|
|
|
|||
|
|
@ -556,7 +556,7 @@ regexp, the last isearch string, and the last replacement regexp."
|
|||
(format "%s: " prompt))
|
||||
nil nil nil 'regexp-history defaults t)))
|
||||
(if (equal input "")
|
||||
default-value
|
||||
(or default-value input)
|
||||
(prog1 input
|
||||
(add-to-history 'regexp-history input)))))
|
||||
|
||||
|
|
@ -570,7 +570,7 @@ regexp, the last isearch string, and the last replacement regexp."
|
|||
"Read arguments for `keep-lines' and friends.
|
||||
Prompt for a regexp with PROMPT.
|
||||
Value is a list, (REGEXP)."
|
||||
(list (read-regexp prompt "") nil nil t))
|
||||
(list (read-regexp prompt) nil nil t))
|
||||
|
||||
(defun keep-lines (regexp &optional rstart rend interactive)
|
||||
"Delete all lines except those containing matches for REGEXP.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue