From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Why is `C-M-x' only for top-level defuns? Date: Wed, 11 Jan 2012 23:05:56 -0500 Message-ID: References: <87zkdtdbk1.fsf@mail.jurta.org> <4F0E4835.1030106@dancol.org> <5115ABD13D084717AA639D79BCCE9753@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1326341191 23577 80.91.229.12 (12 Jan 2012 04:06:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 12 Jan 2012 04:06:31 +0000 (UTC) Cc: 'Juri Linkov' , 'Daniel Colascione' , emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 12 05:06:27 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 1RlBvl-0002Fz-Uu for ged-emacs-devel@m.gmane.org; Thu, 12 Jan 2012 05:06:26 +0100 Original-Received: from localhost ([::1]:33341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlBvk-0000Gx-Qb for ged-emacs-devel@m.gmane.org; Wed, 11 Jan 2012 23:06:24 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:60820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlBvi-0000Ff-6I for emacs-devel@gnu.org; Wed, 11 Jan 2012 23:06:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlBvh-0003x9-4R for emacs-devel@gnu.org; Wed, 11 Jan 2012 23:06:22 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:31808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlBvg-0003x5-UT for emacs-devel@gnu.org; Wed, 11 Jan 2012 23:06:21 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAMNbDk9FxKkV/2dsb2JhbABBrQqBBoFyAQEEAVYjBQsLNBIUGA0kiA23f4wdBIg6mlqEUg X-IronPort-AV: E=Sophos;i="4.71,496,1320642000"; d="scan'208";a="156346314" Original-Received: from 69-196-169-21.dsl.teksavvy.com (HELO ceviche.home) ([69.196.169.21]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 11 Jan 2012 23:06:18 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 5920C66110; Wed, 11 Jan 2012 23:05:56 -0500 (EST) In-Reply-To: <5115ABD13D084717AA639D79BCCE9753@us.oracle.com> (Drew Adams's message of "Wed, 11 Jan 2012 19:42:14 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:147603 Archived-At: > Stefan might be right that it would be difficult to get right - dunno. > Off the top of my head, however, I'd guess that just going `uplist' > from point till finding `defface', `defcustom', or `defvar' as the car > might be good enough. C-M-x differs from C-x C-e in two aspects: 1- it "guesses" which sexp is meant. 2- it handles defface/defvar/defcustom specially. IIUC you're only worried about the first partt o the extent that it prevents you from getting to the second. I.e. what you're after is a way to get (2) of C-M-x for sexps where (1) currently fails. I'm not very much in fa vor of trying to make (1) smarter because it will make it less uniform. So we could maybe provide a new command half-way between C-x C-e and C-M-x, or maybe change (1) so that it uses the region if active. Stefan