[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: |
Drew Adams |
Subject: |
bug#19217: 25.0.50; `C-M-x' (`eval-defun') on a `defface' that is not top-level |
Date: |
Wed, 10 Dec 2014 14:20:13 -0800 (PST) |
Hi Alan,
> > > What happens when you do C-x C-e with point just after the
> > > `defface' form?
>
> > As I said, nothing happens.
>
> OK. I've hacked the following patch together, which wasn't actually
> all that difficult. I've tested it out on a defvar, and it works there.
> It gives C-x C-e the same special handling that C-M-x has for defvar's,
> defcustom's, defface's, etc. It's incomplete (no documentation has
> been changed), but it might do what you need. Please try it out.
Sorry for the delay. I tried it, for both defface and defvar, using
this:
(when t
(defface foo '((((background dark)) (:foreground "#58DFFA4FFFFF"))
(t (:foreground "Firebrick")))
"A face." :group 'help);
)
(when t
(defvar toto 42
"Forty-two.");
)
After evaling the sexps and then modifying the values
(e.g. Firebrick -> Blue, 42 -> 56), I put point before the `;'
and tried C-x C-e.
Starting from emacs -Q, it works, for both face & var. With my
setup, however, it does not work (no change from before). Dunno why.
Tried it with `lexical-binding' t and nil - neither worked.
I'll bisect my setup when I get a moment, to try to find out why it
doesn't work for me.
Thanks for working on this.