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: Why is `C-M-x' only for top-level defuns? Date: Wed, 11 Jan 2012 16:36:38 -0800 Message-ID: References: <87zkdtdbk1.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1326328614 18793 80.91.229.12 (12 Jan 2012 00:36:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 12 Jan 2012 00:36:54 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Juri Linkov'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 12 01:36:49 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rl8eu-0007oD-RO for ged-emacs-devel@m.gmane.org; Thu, 12 Jan 2012 01:36:48 +0100 Original-Received: from localhost ([::1]:57992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rl8eu-0004HT-EO for ged-emacs-devel@m.gmane.org; Wed, 11 Jan 2012 19:36:48 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:55650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rl8es-0004HM-L3 for emacs-devel@gnu.org; Wed, 11 Jan 2012 19:36:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rl8er-0007eY-Gh for emacs-devel@gnu.org; Wed, 11 Jan 2012 19:36:46 -0500 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:65155) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rl8er-0007eR-7E for emacs-devel@gnu.org; Wed, 11 Jan 2012 19:36:45 -0500 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id q0C0aher009316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 12 Jan 2012 00:36:43 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 q0C0ag1t000218 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 12 Jan 2012 00:36:42 GMT Original-Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q0C0afjH031627; Wed, 11 Jan 2012 18:36:41 -0600 Original-Received: from dradamslap1 (/10.159.35.187) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 11 Jan 2012 16:36:41 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87zkdtdbk1.fsf@mail.jurta.org> Thread-Index: AczQvyl49CrHZB8uRW6tNTw0Dc4FVwAAjPgw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-CT-RefId: str=0001.0A090207.4F0E2B1C.001D,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 148.87.113.117 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:147599 Archived-At: > > (when twillig-&-the-tithy-toves-do-tyre-&-timble-in-the-twabe > > (defface ...)) > > > > Currently, in order to make `C-M-x' work for such a "defun" > > I temporarily move its first line to column 1 and then hit `C-M-x'. > > Seems like a silly workaround, but I don't know of a better one. > > Without editing the buffer, you could narrow to the inner expression > with e.g. `C-M-SPC C-x n n' and use `C-M-x'. Sure, but that's about as long as the other workaround, especially considering following it with `C-x n w'. I don't mind using a workaround if there's a good reason why `C-M-x' does what it does and it shouldn't be changed. > But then you might ask why `C-x n d' (`narrow-to-defun') > narrows to the top-level expression, and not to the innermost defface, > defcustom etc. ;-) No, but I suppose it too could be asked. My question is whether we really want `C-M-x' to do what it does instead of just pick up the innermost def* containing point. And why it does the former. If there's a good reason, I'd like to know it.