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: Thu, 12 Jan 2012 07:29:12 -0800 Message-ID: References: <87zkdtdbk1.fsf@mail.jurta.org> <4F0E4835.1030106@dancol.org><5115ABD13D084717AA639D79BCCE9753@us.oracle.com> <87aa5t9qze.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 1326382186 2360 80.91.229.12 (12 Jan 2012 15:29:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 12 Jan 2012 15:29:46 +0000 (UTC) Cc: 'Daniel Colascione' , emacs-devel@gnu.org To: "'Juri Linkov'" , "'Stefan Monnier'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 12 16:29:42 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 1RlMay-0000uJ-6U for ged-emacs-devel@m.gmane.org; Thu, 12 Jan 2012 16:29:40 +0100 Original-Received: from localhost ([::1]:38101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlMax-0004mr-Ie for ged-emacs-devel@m.gmane.org; Thu, 12 Jan 2012 10:29:39 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:53669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlMar-0004Vh-Ly for emacs-devel@gnu.org; Thu, 12 Jan 2012 10:29:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlMan-0004Tj-BF for emacs-devel@gnu.org; Thu, 12 Jan 2012 10:29:33 -0500 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:41523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlMan-0004TZ-19 for emacs-devel@gnu.org; Thu, 12 Jan 2012 10:29:29 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id q0CFTLSN019202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 12 Jan 2012 15:29:21 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q0CFTI5r014706 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 12 Jan 2012 15:29:19 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 q0CFTHeH010434; Thu, 12 Jan 2012 09:29:18 -0600 Original-Received: from dradamslap1 (/10.159.35.187) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 12 Jan 2012 07:29:17 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87aa5t9qze.fsf@mail.jurta.org> Thread-Index: AczRFhgOEViROv7lQde7eSXbp7JImgAJ+YLA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4F0EFC52.004D,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 141.146.126.227 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:147614 Archived-At: > > I'm not very much in favor 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. > > (if (use-region-p) (eval-region (region-beginning) (region-end)) ...) > in `eval-defun' (`C-M-x') would be a nice addition since `eval-region' > has no own keybinding. Again, this is not about `eval-region', which _does not redefine_ a face or var that is already defined. It's about the special behavior provided by `eval-defun' which does redefine. And I'm interested in a redefining command/key, not making the user activate the region around a sub-sexp before asking for redefinition. A command/key can find the innermost defface etc. surrounding point without any need for the user to first select it as the region.