emacs-devel
[Top][All Lists]
Advanced

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

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


From: Stefan Monnier
Subject: Re: New keybinding suggestion: C-x _ for `shrink-window'
Date: Fri, 16 Nov 2007 10:47:54 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

> Maybe I'm a bit dim on this, but I don't really get the point about
> using `overriding-terminal-local-map'.

> Stefan proposed this when Lennart replied to Juri's suggestion to
> implement winsize.el (bw-interative.el at that time) as a major mode.
> Can `overriding-terminal-local-map' be useful in the context of a major
> mode?  of a minor mode?  of a loop waiting for an event?

> For now I don't see any good reasons to implement window-resize.el as a
> minor mode or to use `overriding-terminal-local-map'.  I guess I miss
> something here.

I'm not sure what method you use instead, but I see two choices:

- use a keymap with high priority.
- use `read-event' in a loop.

If using the first, then overriding-terminal-local-map is about as high
priority as it gets.  And it's terminal-specific so you should be able
to use it independently, from two terminals at the same time (assuming
the rest of the code is careful not to abuse global vars when
terminal-parameters should be used instead).

If using the second, you lose most of the benefits of the top-level
loop: you don't call pre/post-command-hook, you may prevent filters from
running, you have to be careful with input-decode-map, function-key-map,
etc...

Note that using overriding-terminal-local-map is not necessarily a piece
of cake either.  Actually I think it would be good to extract the
relevant part of isearch and make it isearch-independent so it can be
reused by other packages.


        Stefan




reply via email to

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