From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: custom-themes BAD? Date: Tue, 25 Feb 2014 09:35:36 -0800 (PST) Message-ID: <6db8b575-a9b3-471d-8007-765fbdc8b9df@default> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1393349772 18367 80.91.229.3 (25 Feb 2014 17:36:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Feb 2014 17:36:12 +0000 (UTC) To: Dan Espen , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 25 18:36:16 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WILvN-0007Ur-WA for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Feb 2014 18:36:10 +0100 Original-Received: from localhost ([::1]:36295 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WILvN-0007Zg-Ks for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Feb 2014 12:36:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WILv2-0007WE-1g for help-gnu-emacs@gnu.org; Tue, 25 Feb 2014 12:35:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WILut-0000wo-9E for help-gnu-emacs@gnu.org; Tue, 25 Feb 2014 12:35:47 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:31506) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WILut-0000wk-2d for help-gnu-emacs@gnu.org; Tue, 25 Feb 2014 12:35:39 -0500 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s1PHZbYU020510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 25 Feb 2014 17:35:38 GMT Original-Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s1PHZaVK006555 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 25 Feb 2014 17:35:37 GMT Original-Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id s1PHZaiV006543; Tue, 25 Feb 2014 17:35:36 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96194 Archived-At: > When we get to packages like gnus, gnus goes ahead and > defines it's own faces: >=20 > gnus-cite-attribution-face > gnus-cite-face-1 > gnus-cite-face-2 > gnus-cite-face-3 > gnus-cite-face-4 > gnus-cite-face-5 > gnus-cite-face-6 > gnus-cite-face-7 > gnus-cite-face-8 > gnus-cite-face-9 > gnus-cite-face-10 > gnus-cite-face-11 > gnus-emphasis-bold > gnus-emphasis-bold-italic >=20 > That's the problem, there should be font-lock faces like: >=20 > font-lock-bold, > font-lock-level-1 thru 12, > font-lock-large-1,,, > font-lock-blue... > font-lock-reverse Those are not existing font-lock faces, AFAIK. They are certainly not defined by library `font-lock.el'. > and so on. >=20 > All the packages should be using font-lock-* faces as far as > possible. Then the themes can all set the same set of faces > much more easily. I cannot speak to whether it is appropriate for Gnus to define faces for its use here or whether it should instead just use common font-lock faces instead. I do not use Gnus. That kind of question needs to be decided on a case-by-case basis. I only want to add here that it is NOT the case that libraries "should" reuse font-lock faces, in general. They should use font-lock faces when that makes sense, and not otherwise. The advantage of reusing a common face is the same as the disadavantage: change it once here and it gets changed everywhere it is used. That makes some things easier and others more difficult. What is especially pernicious, IMO, is *hard-coding* the use of a particular face, rather than providing a new face whose default appearance *inherits* from that face. That makes it unnecessarily difficult for a user to customize the use of that particular highlighting. E.g., a given library `foo.el' might well define a face `foo-emphasis', which might inherit its default appearance from the basic face `italic'. It is then easy for a user to customize the appearance of that Foo highlighting without affecting use of face `italic' throughout Emacs. If, instead, `foo.el' just uses face `italic', then the user loses flexibility: s?he must change the appearance everywhere or nowhere. If a library defines a new face, but inherits its default appearance from another face, a user can customize either the parent face or the child. In the former case, the result is the same as in the hard-coded context: customize once to change the appearance everywhere (everywhere that inherits). So you really lose nothing by defining a library-specific face. Other people, including some Emacs maintainers, disagree. The result is that we still have some hard-coded uses of general faces, rather than letting users decide easily. With no knowledge of Gnus and its faces, I'll ask: just what is the problem that you are trying to raise here, wrt custom themes? Is it that lots of faces means theme size is too large? IOW, it's not clear to me what your point is.