From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#19217: 25.0.50; `C-M-x' (`eval-defun') on a `defface' that is not top-level Date: Sun, 30 Nov 2014 22:51:22 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1417405952 18157 80.91.229.3 (1 Dec 2014 03:52:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2014 03:52:32 +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 Mon Dec 01 04:52:25 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 1XvI2C-0000KD-T0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Dec 2014 04:52:25 +0100 Original-Received: from localhost ([::1]:52657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvI2C-0007Mr-Jt for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Nov 2014 22:52:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvI22-0007I0-Jk for bug-gnu-emacs@gnu.org; Sun, 30 Nov 2014 22:52:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvI1r-0006sN-8y for bug-gnu-emacs@gnu.org; Sun, 30 Nov 2014 22:52:14 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvI1r-0006sJ-5S for bug-gnu-emacs@gnu.org; Sun, 30 Nov 2014 22:52:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XvI1q-0005Du-Mp for bug-gnu-emacs@gnu.org; Sun, 30 Nov 2014 22:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Dec 2014 03:52: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.141740588720033 (code B ref 19217); Mon, 01 Dec 2014 03:52:02 +0000 Original-Received: (at 19217) by debbugs.gnu.org; 1 Dec 2014 03:51:27 +0000 Original-Received: from localhost ([127.0.0.1]:50248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XvI1H-0005D3-F7 for submit@debbugs.gnu.org; Sun, 30 Nov 2014 22:51:27 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:42936) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XvI1E-0005Cu-K8 for 19217@debbugs.gnu.org; Sun, 30 Nov 2014 22:51:25 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id sB13pN10031950; Sun, 30 Nov 2014 22:51:23 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id D7DB085E7; Sun, 30 Nov 2014 22:51:22 -0500 (EST) In-Reply-To: (Drew Adams's message of "Sat, 29 Nov 2014 10:13:48 -0800 (PST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5141=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5141> : inlines <1571> : streams <1350042> : uri <1836815> 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:96772 Archived-At: > It is not uncommon to have a `defface' inside a condition such as (when > (> emacs-major-version 23)...). Obviously, I'm blindsided by looking mostly at bundled Elisp code, but to get an idea of how common it might be, could you explain why you'd want to wrap it in that way? Also, pointers to code that do that would help. > Currently, `C-M-x' has no effect on such a `defface' occurrence. Yes, same problem for defvar/defcustom, of course. > How about letting users redefine a `defface' with `C-M-x' even in this > case? I think I'd welcome a patch which fixes this well enough (including in the case of C-u C-M-x). The current way C-M-x handled defvar/defface is hackish and ugly. Extending this hack to code wrapped in a conditional test would not be welcome. But replacing the hack with something a bit more generic would be nice. Stefan