[Top][All Lists]

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

Re: New keybinding suggestion: C-x _ for `shrink-window'

From: Bastien
Subject: Re: New keybinding suggestion: C-x _ for `shrink-window'
Date: Fri, 16 Nov 2007 19:19:32 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>> I'm not sure what method you use instead, but I see two choices:
>>> - use a keymap with high priority.
>> This is what I currently use, with a simple (use-local-map ...) in the
>> definition of `window-resize-mode'.
> That's the second lowest priority :-(

Okay, I'm using `overriding-terminal-local-map' in 0.2:


>> The problem is that when `window-resize-mode' sends an error, the point
>> goes in the minibuffer and the active keymap is still the one defined by
>> `overriding-terminal-local-map'.  This is rather confusing since
>> window-resize-mode-map redefines the arrow keys and that these keys
>> might be useful in the minibuffer.  I don't know how to avoid this.
> I'm not sure I understand the problem (i.e. in which way is this
> different with use-local-map).  Maybe all you're missing is
> `unwind-protect'?

AFAIK it's different because `overriding-terminal-local-map' will be
used in the minibuffer as well (whether the user is here intentionally
or by error doesn't really matter.)

I've already protected command from returning errors, but I need to
protect self-insert-command as well.

>> Another question about keymaps in general: in window-resize-mode the
>> buffer is read-only and I'd like to prevent errors to be thrown when the
>> user hits a key that should insert itself in another mode.
> isearch uses a default binding:
>    (define-key map [t] 'window-resize-other-key)
> check isearch-other-control-char and isearch-other-meta-char.

Thanks a lot, I will check this.


reply via email to

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