bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19217: 25.0.50; `C-M-x' (`eval-defun') on a `defface' that is not to


From: Alan Mackenzie
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
User-agent: tin/2.2.0-20131224 ("Lochindaal") (UNIX) (FreeBSD/8.4-RELEASE (amd64))

Hello again, Drew.

In article <mailman.15037.1417408221.1147.bug-gnu-emacs@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).






reply via email to

[Prev in Thread] Current Thread [Next in Thread]