emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Make `C-x {' and `C-x }' repeatable


From: Stefan Monnier
Subject: Re: [PATCH] Make `C-x {' and `C-x }' repeatable
Date: Wed, 22 May 2013 17:47:18 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> I don't know why a prefix arg exits temporary-overlay-map.  Trying to
>   (define-key window-size-adjust-keymap [?\C-u] 'universal-argument)
> doesn't help to fix this.  `C-u' still terminates the key sequence
> `C-x } } } } C-u }'.

I haven't looked into it, but at least I wouldn't know offhand why that
would be a problem (`universal-argument' is a special command with some
nasty ad-hoc handling in the command_loop C code for it, but I can't
think of an obvious reason why it would explain what you're seeing).

>> I want to have a repeatable command bound to a key on `isearch-mode-map'.

Of course.  Bug#14095 is a clear bug linked to the following comment in
set-temporary-overlay-map:

    ;; FIXME: That's the keymaps with highest precedence, except for
    ;; the `keymap' text-property ;-(

the bug is actually wrong, because additionally to the `keymap'
property, overriding-local-map and overriding-terminal-local-map are two
more keymaps of higher precedence.  So the right fix for it is to
introduce a new keymap (call it "overriding-temporary-local-map" or
something) which is like overriding-terminal-local-map except that it
doesn't disable other keymaps (it just has higher precedence).

> Maybe a better implementation would be with the help of
> `set-temporary-overlay-map'.  I'll try to do this for Isearch.

Isearch might benefit from being changed to use such a new
overriding-temporary-local-map as well.  It might let us drop the
isearch-other-char command (which has the drawback of putting things
back onto unread-command-event, which is inherently unreliable in the
presence of some function-key-map bindings, among other problems).
Of course, such a change might also bump into new problems.


        Stefan



reply via email to

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