From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Elisp manual: Note that created faces cannot be removed. Date: Mon, 22 Jul 2019 15:18:48 +0000 Message-ID: <20190722151847.GB5933@ACM> References: <20190720183715.GC27030@ACM> <83a7d8sg7w.fsf@gnu.org> <838ssssg4v.fsf@gnu.org> <20190720202608.GD27030@ACM> <837e8crui6.fsf@gnu.org> <20190722100209.GA5933@ACM> <83ef2iqgu3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="193769"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: npostavs@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 22 17:19:15 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hpa5p-000oF9-Nj for ged-emacs-devel@m.gmane.org; Mon, 22 Jul 2019 17:19:13 +0200 Original-Received: from localhost ([::1]:34482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpa5o-0005Z2-Gg for ged-emacs-devel@m.gmane.org; Mon, 22 Jul 2019 11:19:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46920) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpa5U-0004sm-IS for emacs-devel@gnu.org; Mon, 22 Jul 2019 11:18:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpa5T-0002SP-9Q for emacs-devel@gnu.org; Mon, 22 Jul 2019 11:18:52 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:40733 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1hpa5T-0002Ro-2q for emacs-devel@gnu.org; Mon, 22 Jul 2019 11:18:51 -0400 Original-Received: (qmail 14191 invoked by uid 3782); 22 Jul 2019 14:26:24 -0000 Original-Received: from acm.muc.de (p4FE15FBF.dip0.t-ipconnect.de [79.225.95.191]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 22 Jul 2019 16:26:22 +0200 Original-Received: (qmail 19436 invoked by uid 1000); 22 Jul 2019 15:18:48 -0000 Content-Disposition: inline In-Reply-To: <83ef2iqgu3.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238790 Archived-At: Hello, Eli. On Mon, Jul 22, 2019 at 17:33:40 +0300, Eli Zaretskii wrote: > > Date: Mon, 22 Jul 2019 10:02:09 +0000 > > Cc: emacs-devel@gnu.org, Noam Postavsky > > From: Alan Mackenzie > > 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. > That's fine with me, but unlike you, I don't really see a difference: > for the reader of the ELisp manual "cannot undefine safely" and > "cannot remove" are identical for all practical purposes. Moreover, > "undefine a face" is not really well-defined. Well, I've just committed the change. Maybe there's only a slight difference between "cannot remove" and "cannot undefine safely", but there actually is a difference - the latter is closer to the truth. "undefine a face" might not be well-defined, but since we can't do it anyway (at least, not safely), that surely doesn't matter too much. Stefan has suggested we hack such a facility, but ... Well somebody would have to do it, and the benefit of it would not be great. Anyway, I think we've talked around this enough already, so let's just close the conversation. :-) -- Alan Mackenzie (Nuremberg, Germany).