From: Drew Adams <drew.adams@oracle.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
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: Sun, 30 Nov 2014 20:29:18 -0800 (PST) [thread overview]
Message-ID: <183f89bc-527c-48ad-80ae-fd73c52874fe@default> (raw)
In-Reply-To: <jwvd284yqtz.fsf-monnier+emacsbugs@gnu.org>
> > 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?
I just did - when the defface (e.g. the given face itself) makes
sense only for certain Emacs versions. It doesn't matter how
common it is - it is common enough. There is no reason users should
not have a simple way to redefine a defface, defvar, or defcustom,
at top level or not.
This should not need to be justified by showing how commonly it is
needed. Obviously this is only a nice-to-have; we've been getting
along without it for decades. So what?
The current limitation to top-level is for what reason? For users?
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 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.
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.
> > 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).
I don't have a patch. I too welcome a simple improvement here.
> 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.
> Extending this hack to code wrapped in a conditional test would
> not be welcome.
Sounds like we're in for a few more decades of the same.
> But replacing the hack with something a bit more generic would
> be nice.
Provided we don't lose other functionality or convenience.
"Beware the generic rewrite improvement." This should not be
a big deal.
next prev parent reply other threads:[~2014-12-01 4:29 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 [this message]
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
[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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=183f89bc-527c-48ad-80ae-fd73c52874fe@default \
--to=drew.adams@oracle.com \
--cc=19217@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.