emacs-devel
[Top][All Lists]
Advanced

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

ffap bindings suggestion


From: Drew Adams
Subject: ffap bindings suggestion
Date: Wed, 8 Feb 2006 10:46:36 -0800

1. Library ffap.el makes these bindings, among others:

 (global-set-key [S-mouse-3] 'ffap-at-mouse)
 (global-set-key [C-S-mouse-3] 'ffap-menu)

These keys are undefined in vanilla Emacs, so this is not bothersome.
However, it is common to use mouse-3 for pop-up menus, and alternative,
related menus might, in some contexts, be appropriate for mouse-3 plus
modifiers. For example, a library might want to use mouse-3 for one menu,
S-mouse-3 for a related menu, and C-S-mouse-3 for another related menu.

Suggestion: Change the ffap bindings to [S-mouse-2] and [C-S-mouse-2].

These keys are also undefined in vanilla Emacs. [S-mouse-2] is akin to
mouse-2 when the latter follows a link (which is essentially what
`ffap-at-mouse' does), so it feels natural to use.

I use the mouse-2 bindings suggested here, and I don't mind continuing to
customize my setup to do so. I just wonder if they might also be better as
the default bindings.


2. Should variable `ffap-bindings' be a defcustom, so that users can more
easily customize the bindings? In that case, the library could be modified
slightly to not require users to put `(ffap-bindings)' in their .emacs:
simply loading the library would create the (default or customized)
bindings.

There are no doubt other, cleaner ways (minor mode?) to deal with the
bindings, but the current way, in any case, seems a bit awkward.

One simple, standard approach would be to not make any bindings, and just
mention the current bindings as suggestions. That would of course require
users to copy all of the key-binding code (possibly modifying it) to their
.emacs. A single defcustom seems like a reasonable alternative: if you do
nothing, you get the default bindings, but it is also easy to change them.

How do other libraries deal with multiple non-standard bindings?





reply via email to

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