From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: button-buffer-map should inherit from special-mode-map Date: Thu, 21 Feb 2013 10:29:49 -0800 Message-ID: <64BBBA8150564874B08184FC5A733196@us.oracle.com> References: <87y5ehsimf.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1361473295 11489 80.91.229.3 (21 Feb 2013 19:01:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Feb 2013 19:01:35 +0000 (UTC) To: , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 21 20:01:58 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U8bP3-0001Q1-H8 for ged-emacs-devel@m.gmane.org; Thu, 21 Feb 2013 20:01:57 +0100 Original-Received: from localhost ([::1]:47164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8bOj-0001Cn-4m for ged-emacs-devel@m.gmane.org; Thu, 21 Feb 2013 14:01:37 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8auG-0002oZ-6b for emacs-devel@gnu.org; Thu, 21 Feb 2013 13:30:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8au8-0007uy-BU for emacs-devel@gnu.org; Thu, 21 Feb 2013 13:30:06 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:23112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8au2-0007qv-GN; Thu, 21 Feb 2013 13:29:54 -0500 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r1LITqf1021215 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Feb 2013 18:29:53 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r1LITpXB005713 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Feb 2013 18:29:52 GMT Original-Received: from abhmt111.oracle.com (abhmt111.oracle.com [141.146.116.63]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r1LITpWp026468; Thu, 21 Feb 2013 12:29:51 -0600 Original-Received: from dradamslap1 (/130.35.178.8) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 21 Feb 2013 10:29:51 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87y5ehsimf.fsf@gnu.org> Thread-Index: Ac4QXp+Lb0pei+whSpe9oPple6KSBgAAR0VA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:157241 Archived-At: > 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. I'm no expert on this, but that does not sound right to me. 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'. It seems to me that if some particular map needs the characteristics of both `button-buffer-map' and `special-mode-map' then it should explicitly adopt them both, e.g. as `help-mode-map' does. Why assume that the characteristics of `special-mode-map' (e.g. keys) are appropriate for all uses of `button-buffer-map'? What's really gained by this additional coupling? IMO, there has been too liberal a use of `special-mode-map' recently, which has sometimes required later backing out some such coupled behavior (e.g. keys). In general, this alone should be a red flag (watch out!): "and additionally, some useful bindings are inherited". One person's or one library's handy convenience is another's obstacle that must be overcome. What if those "useful bindings" are not appropriate for your mode that inherits from `button-buffer-map'? Why not keep these maps separate, and let code couple/compose them explicitly when appropriate?