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 11:26:36 -0800 Message-ID: <8FD33424BFE2446D8072FC1798D0021B@us.oracle.com> References: <87y5ehsimf.fsf@gnu.org><64BBBA8150564874B08184FC5A733196@us.oracle.com> <87mwuxse47.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 1361474808 27633 80.91.229.3 (21 Feb 2013 19:26:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Feb 2013 19:26:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 21 20:27:11 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 1U8bnR-0001HP-Kl for ged-emacs-devel@m.gmane.org; Thu, 21 Feb 2013 20:27:09 +0100 Original-Received: from localhost ([::1]:53404 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8bn6-0007Wx-OH for ged-emacs-devel@m.gmane.org; Thu, 21 Feb 2013 14:26:48 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8bn2-0007Wq-LE for emacs-devel@gnu.org; Thu, 21 Feb 2013 14:26:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8bn1-0005k9-6T for emacs-devel@gnu.org; Thu, 21 Feb 2013 14:26:44 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:40183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8bmy-0005ia-OY; Thu, 21 Feb 2013 14:26:40 -0500 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r1LJQd8j003957 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Feb 2013 19:26:39 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r1LJQc8q008988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Feb 2013 19:26:38 GMT Original-Received: from abhmt120.oracle.com (abhmt120.oracle.com [141.146.116.72]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r1LJQcoE028145; Thu, 21 Feb 2013 13:26:38 -0600 Original-Received: from dradamslap1 (/130.35.178.8) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 21 Feb 2013 11:26:37 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87mwuxse47.fsf@gnu.org> Thread-Index: Ac4QYzBk6U7BH30QT/mJmXLtfeWxHgAAF4Uw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 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:157244 Archived-At: > > 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, Where does it say so? In any case, I take issue with such a claim. It is doubtful that there is ANY given set of key bindings or ANY particular predefined behavior that is appropriate for ALL non-self-insert buffers. (Except the empty set of keys and empty behavior.) `special-mode-map' certainly does not fill that bill. > and button-buffer-map is only used in such buffers, What buffers - non-self-insert buffers? Are you claiming also that b-b-map is appropriate for ALL buffers where keys are not self-inserting? That too I disagree with. `button-buffer-map' is defined only as a "Keymap useful for buffers containing buttons." There is nothing in that straightforward definition that implies that every buffer that has buttons must be non-self-insert. Whether buttons make sense for a given buffer is not dependent on whether the buffer allows some keys to self-insert. > so, whenever a map inherits from button-buffer-map but not > special-mode-map, it can be assumed to be an oversight. Your logic is sound: N => S and B => N, therefore B => S: 1. Assume: non-self-insert buffer implies s-m-map is appropriate. 2. Assume: b-b-map implies non-self-insert buffer. 3. Therefore, any map that inherits from b-b-m should also inherit from s-m-map. The logic is fine. What I reject are the assertions, #1 and #2. > > What's really gained by this additional coupling? > > Simplicity and clarity of code and intent. The intent of `button-buffer-map' is clear, and that stated intention does not jibe with the interpretation you want to give it. Sorry. `button-buffer-map' is a keymap for buffers where buttons are appropriate. Nothing more, nothing less. Up to the person who uses b-b-map to decide whether buttons are appropriate in any given context. `button-buffer-map' does not imply `special-mode-map'. And it does not imply that the buffer does not allow any self-insertion.