[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23536: 25.1.50; viper-mode "/" search includes "(default ...) " pref
From: |
Eli Zaretskii |
Subject: |
bug#23536: 25.1.50; viper-mode "/" search includes "(default ...) " prefix |
Date: |
Sat, 14 May 2016 11:50:06 +0300 |
> From: Jim Meyering <jim@meyering.net>
> Date: Fri, 13 May 2016 22:31:38 -0700
>
> This is using emacs commit (latest master)
> c8109d9c4057d8cac79e2c139758cadd410e7446.
> How to repro?
> Invoke this: emacs -nw -Q -f viper-mode
> Then answer "n" to the viperize prompt.
> Type "/foo" and hit ENTER.
> You'll notice that the minibuffer now contains this:
>
> ‘(default ) foo’: Pattern not found
>
> implying that you've searched for a string significantly different than "foo".
> If you try again, you'll see that the search string grows even longer:
>
> ‘(default (default ) foo) foo’: Pattern not found
>
> It looks like this problem was introduced via commit
> 088acab3831b45e0e0749705226b8680076df4b6, since
> if I revert that and rebuild, the problem goes away.
Please see if the patch below fixes the problem, and doesn't bring new
ones. (I don't use viper-mode, and we don't have a test suite for it,
so I couldn't easily test the result beyond your simple recipe.)
Thanks.
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index da72b97..6951dbb 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -2127,6 +2127,7 @@ viper-read-string-with-history
(setq keymap (or keymap minibuffer-local-map)
initial (or initial "")
+ viper-initial initial
temp-msg (if default
(format "(default %s) " default)
""))