[Top][All Lists]

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

Re: button-buffer-map should inherit from special-mode-map

From: Sam Steingold
Subject: Re: button-buffer-map should inherit from special-mode-map
Date: Thu, 21 Feb 2013 13:42:16 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> * Drew Adams <address@hidden> [2013-02-21 10:29:49 -0800]:
>> IMO, button-buffer-map should inherit from special-mode-map because
>> whenever it is used, the map which inherits from it is immediately
>> subject to suppress-keymap.  If button-buffer-map inherits from
>> special-mode-map, then this is done automatically, and,
>> additionally, some useful bindings are inherited.
>> I will commit a patch to this effect unless someone objects.
> Why assume that the characteristics of `special-mode-map' (e.g. keys)
> are appropriate for all uses of `button-buffer-map'?

Because special-mode-map is supposed to be appropriate for any
non-self-insert buffer, and button-buffer-map is only used in such
buffers, so, whenever a map inherits from button-buffer-map but not
special-mode-map, it can be assumed to be an oversight.

> Different libraries use `button-mode-map' differently.  E.g. 
> `apropos-mode-map'
> is a _copy_ of `button-mode-map' and it has `special-mode-map' as its parent.
> And `help-mode-map' has as its parent a keymap composed from 
> `button-buffer-map'
> and `special-mode-map'.

These look like workarounds for the bug of button-buffer-map not
inheriting from special-mode-map.

> What's really gained by this additional coupling?

Simplicity and clarity of code and intent.

Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://jihadwatch.org http://truepeace.org
http://www.memritv.org http://camera.org http://thereligionofpeace.com
Why use Windows, when there are Doors?

reply via email to

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