From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Eliminating a couple of independent face definitions Date: Wed, 2 Feb 2011 07:15:39 -0800 Message-ID: <90BACDFFEFD5468CB28B9AF8BCB288AD@us.oracle.com> References: <87oc6vm67v.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1296666975 26840 80.91.229.12 (2 Feb 2011 17:16:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 2 Feb 2011 17:16:15 +0000 (UTC) Cc: 'Chong Yidong' , emacs-devel@gnu.org To: "'Tim Cross'" , "'Lennart Borgman'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 02 18:16:10 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PkgJH-0001Pt-Cs for ged-emacs-devel@m.gmane.org; Wed, 02 Feb 2011 18:16:05 +0100 Original-Received: from localhost ([127.0.0.1]:49358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkgJF-00059R-LB for ged-emacs-devel@m.gmane.org; Wed, 02 Feb 2011 12:16:01 -0500 Original-Received: from [140.186.70.92] (port=46024 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkeSM-0002rG-J9 for emacs-devel@gnu.org; Wed, 02 Feb 2011 10:17:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PkeSH-0000OO-Bd for emacs-devel@gnu.org; Wed, 02 Feb 2011 10:17:18 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:24890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PkeSH-0000O9-6A for emacs-devel@gnu.org; Wed, 02 Feb 2011 10:17:13 -0500 Original-Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p12FGqFU028500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 2 Feb 2011 15:16:53 GMT Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p12FGoDs002623; Wed, 2 Feb 2011 15:16:51 GMT Original-Received: from abhmt013.oracle.com by acsmt353.oracle.com with ESMTP id 1015916871296659742; Wed, 02 Feb 2011 07:15:42 -0800 Original-Received: from dradamslap1 (/10.159.40.214) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 02 Feb 2011 07:15:41 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcvCly2JBrNU1ywYTVCPvsVEZMK6GwAU17xQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 148.87.113.121 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135468 Archived-At: I cannot really voice an objection. I'd just point out that inheriting means coupling (dependence). The upside is of course the same as the downside: change an ancestor and you change the descendents. That might be what you want sometimes, and it might not be what you want sometimes. (Of course, inheritance can be overridden/broken.) FWIW, in my own use of faces I tend not to inherit too much. Faces have particular uses (contexts), and it is not that common that the use/purpose is similar enough that inheritance is called for (in my usage, at least). And I disagree with the general tendency here to avoid defining new faces (aka the tendency to reuse faces defined for a different purpose). Having two different faces, even with the same attribute values, designed for two different uses/purposes, makes sense in general. It is not a great idea, in general, to reuse a face just because you want the same color etc. Similarly, I've disagreed with the practice of hard-coding `highlight' as the `mouse-face' property (throughout the code). In general, we should use either a face variable or a new face for each such use, so that users can change the behavior/appearance in different contexts (without redefining the hard-coded code).