From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#19217: 25.0.50; `C-M-x' (`eval-defun') on a `defface' that is not top-level Date: 29 Nov 2014 19:10:23 -0000 Organization: muc.de e.V. Message-ID: <20141129191023.34112.qmail@mail.muc.de> References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1417288283 26203 80.91.229.3 (29 Nov 2014 19:11:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Nov 2014 19:11:23 +0000 (UTC) Cc: 19217@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 29 20:11:16 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1XunQK-0003Ci-1E for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Nov 2014 20:11:16 +0100 Original-Received: from localhost ([::1]:48528 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XunQI-0003Z6-Uk for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Nov 2014 14:11:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XunQB-0003Z0-Gq for bug-gnu-emacs@gnu.org; Sat, 29 Nov 2014 14:11:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XunQ6-0006fK-KW for bug-gnu-emacs@gnu.org; Sat, 29 Nov 2014 14:11:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XunQ6-0006fE-H3 for bug-gnu-emacs@gnu.org; Sat, 29 Nov 2014 14:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XunQ6-0001Qb-53 for bug-gnu-emacs@gnu.org; Sat, 29 Nov 2014 14:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Nov 2014 19:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19217 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19217-submit@debbugs.gnu.org id=B19217.14172882295449 (code B ref 19217); Sat, 29 Nov 2014 19:11:02 +0000 Original-Received: (at 19217) by debbugs.gnu.org; 29 Nov 2014 19:10:29 +0000 Original-Received: from localhost ([127.0.0.1]:49371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XunPY-0001Po-JA for submit@debbugs.gnu.org; Sat, 29 Nov 2014 14:10:29 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:45590 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XunPV-0001Pe-Mg for 19217@debbugs.gnu.org; Sat, 29 Nov 2014 14:10:27 -0500 Original-Received: (qmail 34113 invoked by uid 3782); 29 Nov 2014 19:10:23 -0000 In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.2.0-20131224 ("Lochindaal") (UNIX) (FreeBSD/8.4-RELEASE (amd64)) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:96738 Archived-At: Hi, Drew. In article you wrote: > Enhancement request. This has probably been requested before, but > here goes... > It is not uncommon to have a `defface' inside a condition such as (when > (> emacs-major-version 23)...). Currently, `C-M-x' has no effect on > such a `defface' occurrence. In order to have Emacs DTRT, I find myself > working around this limitation by temporarily moving the `defface' to > bol. You can also move point to just after the closing ) and do C-x C-e (`eval-last-sexp'). > How about letting users redefine a `defface' with `C-M-x' even in this > case? How is Emacs to determine which depth of parenthesis is to be considered the opening one? For example, if a defface is contained within a defmacro, which one is to be executed on C-M-x? > At least optionally. For example, let a non-positive prefix arg do > this, and have edebug instrumentation done only for a non-negative > prefix arg. > Or maybe always (not optionally)? Is there a good reason for doing this > only at top-level? I think it is to make it unambiguous, which form is to be evaluated. > If the reason is that `eval-defun' cannot recognize the defun > (`defface') unless it is at top level, then surely there is some way to > make this more flexible. > In GNU Emacs 25.0.50.1 (i686-pc-mingw32) > of 2014-10-20 on LEG570 > Bzr revision: 118168 rgm@gnu.org-20141020195941-icp42t8ttcnud09g > Windowing system distributor `Microsoft Corp.', version 6.1.7601 > Configured using: > `configure --enable-checking=yes,glyphs CPPFLAGS=-DGLYPH_DEBUG=1' -- Alan Mackenzie (Nuremberg, Germany).