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


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 19217 <at> debbugs.gnu.org
Subject: bug#19217: 25.0.50; `C-M-x' (`eval-defun') on a `defface' that is not top-level
Date: 1 Dec 2014 17:02:27 -0000
Hello again, Drew.

In article <mailman.15037.1417408221.1147.bug-gnu-emacs <at> gnu.org> you wrote:

> The current limitation to top-level is for what reason?  For users?

For both users and implementors.  "The top level construct containing
point (or the one following point)" is wonderfully consistent and clear
for all concerned.

> I'm guessing that the only answer is that this limitation simplifies
> the *implementation*, not that it simplifies things for users.
> 30 years later, we ought to be able to do a little better (for users).

I wasn't really aware of the special handling for `defvar', `defface',
etc. in C-M-x until just now.  In fact I thought C-M-x and C-x C-e did
the same thing.

As a suggestion, why not enhance C-x C-e also to handle these defining
constructs specially?

> I suggested a simple improvement that can be made easily - let users
> do it at least when point is on the defface etc. symbol.  That's a
> limitation, but it at least gives you some way to easily redefine the
> critter.

It's not rocket science, no, but it is still a bit tricky to do.

> The point is that there is currently *no* way for a user to do it.
> It's not about making things super general.  Just give us some easy
> way to do it.  Let's not let the search for something ideal become
> the enemy of making a simple improvement.

Again, I suggest enhancing C-x C-e.

> I don't have a patch.  I too welcome a simple improvement here. 

You don't have a patch _yet_.  You could write one.  I think there's a
good chance Stefan would accept it.

>> The current way C-M-x handled defvar/defface is hackish and ugly.

> I assume you're talking about the implementation and not the way
> users interact with Emacs using it.  The current user interaction
> is simple and useful.

Yes, the implementation is ugly.  Given how it breaks the rules about not
redefining defxxx's, I don't see how it can be other than ugly.

-- 
Alan Mackenzie (Nuremberg, Germany).





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

Previous Next


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