emacs-devel
[Top][All Lists]
Advanced

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

Re: position on changing defaults?


From: Kim F. Storm
Subject: Re: position on changing defaults?
Date: Sat, 08 Mar 2008 19:07:41 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.91 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> Obviously, this can't work as is.  Maybe an even better generalization
> would be
>
>   (define-key function-key-map [is-shifted-p]
>     (lambda (prompt key) (vector (remove-shift key))))
>   (define-key function-key-map [is-mouse-4-p]
>     (lambda (prompt key)
>       (vector (combine-modifiers (modifiers key) 'mwheel-up)))
>
> where `is-shifted-p' and `is-mouse-4-p' are Lisp functions.

The argument against using pre-command-hook and post-command-hook is 
efficiency - the above seems a lot less efficient (I suppose you have
to run all such lisp functions until you find one which returns
true) - which also means that the sequence of key bindings in 
the keymaps start to matter...

IMO, this interface is even worse that using the current hooks!

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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