bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#2495: 23.0.91; regression in M-x flush-lines


From: Juri Linkov
Subject: bug#2495: 23.0.91; regression in M-x flush-lines
Date: Wed, 05 Aug 2009 23:14:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)

>> emacs -Q
>> M-< ; beginning of *scratch* buffer
>> M-x flush-lines RET RET
>
> In 22.3, this used read-from-minibuffer, which returns the empty
> string in case of no input.
>
> Now it used read-regexp, which returns nil in case of no input (if no
> default is supplied). That doesn't seem right.
>
> Perhaps this:
>
> *** replace.el        9 Jan 2009 05:01:00 -0000       1.282
> --- replace.el        27 Feb 2009 21:41:59 -0000
> ***************
> *** 556,562 ****
>            (format "%s: " prompt))
>          nil nil nil 'regexp-history defaults t)))
>       (if (equal input "")
> !     default-value
>         (prog1 input
>       (add-to-history 'regexp-history input)))))
>   
> --- 556,562 ----
>            (format "%s: " prompt))
>          nil nil nil 'regexp-history defaults t)))
>       (if (equal input "")
> !     (or default-value input)
>         (prog1 input
>       (add-to-history 'regexp-history input)))))

Currently flush-lines always displays the misleading prompt

  Flush lines containing match for regexp (default ):
                                          ==========

where default is empty that makes no sense without a real
default value.

I think Glenn provided the correct patch for this bug (seen above).

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]