GNU bug report logs - #19217
25.0.50; `C-M-x' (`eval-defun') on a `defface' that is not top-level

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sat, 29 Nov 2014 18:15:02 UTC

Severity: wishlist

Tags: fixed

Found in version 25.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 19217 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 19217 <at> debbugs.gnu.org
Subject: Re: 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
> 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




This bug report was last modified 4 years and 280 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.