Mercurial > emacs
changeset 104244:97bc7c2be2d0
(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)
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Wed, 12 Aug 2009 20:55:31 +0000 |
parents | a3d4286317ce |
children | bad609d63d3c |
files | lisp/replace.el |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/replace.el Wed Aug 12 20:54:46 2009 +0000 +++ b/lisp/replace.el Wed Aug 12 20:55:31 2009 +0000 @@ -556,7 +556,7 @@ (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 @@ "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.