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

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

bug#15568: Lookup this-command-keys without a prefix argument


From: Juri Linkov
Subject: bug#15568: Lookup this-command-keys without a prefix argument
Date: Fri, 11 Oct 2013 02:58:35 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

>> Also I discovered that to support a key sequence like
>> `C-s C-u C-u C-l' requires adding the command `universal-argument-more'
>> (and `universal-argument-minus' for completeness).
>
> Indeed, tho I think your fix is a workaround rather than a real fix:
> Basically after the first C-u we're in some kind of transient
> "universal-argument mode" and isearch shouldn't have to know the list of
> commands that can be run in this mode, it should instead just "wait for
> the mode to exit".
>
> This is a general issue regarding interaction between various uses of
> set-temporary-overlay-map (and friends, since isearch doesn't actually
> use set-temporary-overlay-map).  There should be some kind of notion of
> nesting, where the outer set-temporary-overlay-map should not exit as
> long as the inner one is still active.

Maybe `universal-argument--mode' should be defined as a minor mode
and provide a variable with the same name that can be checked by isearch.
This mode can be disabled using `on-exit'.  Something like:

(defun universal-argument--mode ()
  (setq universal-argument--mode t)
  (set-temporary-overlay-map
   universal-argument-map nil
   (lambda () (setq universal-argument--mode nil))))

and in isearch.el:

          (and isearch-allow-prefix
               (or (memq this-command '(universal-argument
                                        digit-argument
                                        negative-argument))
                   universal-argument--mode))





reply via email to

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