[Top][All Lists]

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

Re: Elisp manual: Note that created faces cannot be removed.

From: Alan Mackenzie
Subject: Re: Elisp manual: Note that created faces cannot be removed.
Date: Mon, 22 Jul 2019 10:02:09 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

Hello, Eli.

On Sun, Jul 21, 2019 at 05:28:33 +0300, Eli Zaretskii wrote:
> > Date: Sat, 20 Jul 2019 20:26:08 +0000
> > Cc: address@hidden
> > From: Alan Mackenzie <address@hidden>

> > > > I think without some index entries leading to it, this sentence will
> > > > be lost in the ocean of the information in the manual.

> > Well, this page was the first one I scanned whilst seeking a remove-face
> > function.

> > > Also, defface is not the only way of defining a face, unlike what the
> > > proposed text seems to imply.

> > OK.  How about this slightly amended patch?

> Fine with me, thanks.

Sorry to go on about this (trivial) point, but I'm not happy about my
proposed text any more.  With the mechanism pointed out by Noam, it
clearly _is_ possible to undefine a face, but it's unsafe.

So, using "undefine" rather than "remove" (suggested to me by private
email), and inserting the word "safely", I now propose this:

diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 276d60b21a..4ae0bba723 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2476,6 +2476,10 @@ Defining Faces
 usual procedure is to define a face with @code{defface}, and then use
 its name directly.

+@cindex face (non-removability of)
+Note that once you have defined a face (usually with @code{defface}),
+you cannot later undefine this face safely, except by restarting Emacs.
 @defmac defface face spec doc [keyword value]@dots{}
 This macro declares @var{face} as a named face whose default face spec
 is given by @var{spec}.  You should not quote the symbol @var{face},

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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