unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Drew Adams <drew.adams@oracle.com>
Cc: 19217@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	[thread overview]
Message-ID: <20141201170227.11524.qmail@mail.muc.de> (raw)
In-Reply-To: <mailman.15037.1417408221.1147.bug-gnu-emacs@gnu.org>

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).






  parent reply	other threads:[~2014-12-01 17:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-29 18:13 bug#19217: 25.0.50; `C-M-x' (`eval-defun') on a `defface' that is not top-level Drew Adams
     [not found] ` <mailman.14952.1417284925.1147.bug-gnu-emacs@gnu.org>
2014-11-29 19:10   ` Alan Mackenzie
2014-12-01  3:51 ` Stefan Monnier
2014-12-01  4:29   ` Drew Adams
2014-12-01 13:49     ` Stefan Monnier
     [not found] ` <mailman.15037.1417408221.1147.bug-gnu-emacs@gnu.org>
2014-12-01 17:02   ` Alan Mackenzie [this message]
     [not found] <<mailman.14952.1417284925.1147.bug-gnu-emacs@gnu.org>
     [not found] ` <<20141129191023.34112.qmail@mail.muc.de>
2014-11-29 20:08   ` Drew Adams
2014-11-30 19:58     ` Alan Mackenzie
2014-11-30 20:51       ` Drew Adams
2014-11-30 23:20         ` Alan Mackenzie
2014-12-01  0:00           ` Drew Adams
2014-12-06 19:10         ` Alan Mackenzie
2014-12-10 22:20           ` Drew Adams
2014-12-13  3:07             ` Drew Adams
2020-09-18 13:36           ` Lars Ingebrigtsen
2020-09-18 15:53             ` Drew Adams
2020-09-19 14:10               ` Lars Ingebrigtsen
2020-10-15 14:28             ` Lars Ingebrigtsen
2020-10-15 15:29               ` Drew Adams
2020-10-15 15:35                 ` Lars Ingebrigtsen
2020-10-15 16:15                   ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141201170227.11524.qmail@mail.muc.de \
    --to=acm@muc.de \
    --cc=19217@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).