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

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

bug#67226: 30.0.50; Regression in previous-complete-history-element with


From: Juri Linkov
Subject: bug#67226: 30.0.50; Regression in previous-complete-history-element with empty input
Date: Thu, 16 Nov 2023 19:32:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

> When using previous-complete-history-element like:
>
> The behavior changed sometime recently, because
>
> When the input is empty it shows:
>
>  [No earlier matching history item]
>
> Previously it behaved like `previous-history-element` in that case.
>
> Is this intended due to some recent change or is it an issue?
>
> ```
> Emacs -Q
>
> M-: (keymap-set minibuffer-local-map "<up>" 
> #'previous-complete-history-element)
>
> M-x some-command1
> M-x some-command2
> M-x some-command3
> M-x <up-arrow>
> ```

The regression is on this line in `previous-matching-history-element`:

  (string-match (concat ".*\\(" regexp "\\)") match-string)

In GNU Emacs 29.1.90

  (string-match ".*\\(^\\)" "foo")
  => 0

But in GNU Emacs 30.0.50

  (string-match ".*\\(^\\)" "foo")
  => nil

Cc:ing Stefan.





reply via email to

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