From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: checkdoc (was: mh-e 6.2 imminent) Date: 29 Oct 2002 00:19:13 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: <5xadkyw3ri.fsf@kfs2.cua.dk> References: <200210240928.g9O9Sjs12808@rum.cs.yale.edu> <5x65vsozso.fsf@kfs2.cua.dk> <20021024144551.GA9747@gnu.org> <5xsmyvolsh.fsf@kfs2.cua.dk> <5xvg3qyiqp.fsf@kfs2.cua.dk> <5x7kg4dcr7.fsf@kfs2.cua.dk> <87elaabbh9.fsf@enberg.org> <20021028213703.GA4555@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035843721 15234 80.91.224.249 (28 Oct 2002 22:22:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 28 Oct 2002 22:22:01 +0000 (UTC) Cc: Henrik Enberg , rms@gnu.org, monnier+gnu/emacs@rum.cs.yale.edu, miles@lsi.nec.co.jp, wohler@newt.com, emacs-devel@gnu.org, mh-e-devel@lists.sourceforge.net Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 186IGl-0003xZ-00 for ; Mon, 28 Oct 2002 23:21:59 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 186IL5-000207-00 for ; Mon, 28 Oct 2002 23:26:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 186IFA-0006U2-00; Mon, 28 Oct 2002 17:20:20 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 186IEF-0005fb-00 for emacs-devel@gnu.org; Mon, 28 Oct 2002 17:19:23 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 186IE8-0005OR-00 for emacs-devel@gnu.org; Mon, 28 Oct 2002 17:19:19 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10) id 186IE7-0005JX-00; Mon, 28 Oct 2002 17:19:16 -0500 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id A1BFD7C018; Mon, 28 Oct 2002 22:19:13 +0000 (GMT) Original-To: Miles Bader In-Reply-To: <20021028213703.GA4555@gnu.org> Original-Lines: 75 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8861 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8861 Miles Bader writes: > On Mon, Oct 28, 2002 at 08:38:10PM +0100, Henrik Enberg wrote: > > I think it's pretty natural to end them with -face. And take something > > like `font-lock-keyword-face', what would be a better name? > > `font-lock-keyword' > > [e.g., (setq font-lock-keyword-face 'font-lock-keyword) ] > > > the current name is self-documenting. > > If we ended every variable in `-variable', they would all be "self > documenting" too. > > The question is whether this is useful property, more than it is an annoying > one (and I think you'll agree that calling every variable foo-variable would > be really annoying!). Of course we don't need that .... as long as we call the faces -face :-) > > When I look at source code [I just did this using grep] that refers to > constant face names, which is the main place where this matters, I see > things like: > > (defface foo-face ...) > > (defvar blah-blah-face 'foo-face) > > (put-text-property X Y 'face 'foo-face) > > (set-face-foreground 'foo-face "...") > > (copy-face 'foo-face) > > (let ((face (make-face 'foo-face))) ...) > > (cons 'foo-face list-of-faces) > > Note that all these cases, the `-face' in the face name doesn't help at all, .. except if you need to grep for all uses of a given face. I find it more precise to grep for FOO-face rather than FOO -- which for some FOO gives a lot of false matches. Try to find all uses of the region and mouse faces... I bet that you get numerous false hits that you wouldn't have got had they been named region-face and mouse-face. > because the variable/function/macro/property two which the constant face is > being assigned/passed almost always _explicitly_ makes it clear that a face > is being operated upon. In the `-face' suffix seems redundant, because it's > entirely obvious -- even to someone who doesn't understand what the source > code does! -- that it's a face being manipulated. > > I find the above situation pretty typical. And I like all of them better than the non -face alternatives! > > The main exception, as far as I can see, is font-lock specifications, which > generally look like indecipherable gobs of hair, so the face names tend to > stand out as the one thing who's meaning is obvious. I fully agree re. font-lock!! > > So to summarize, I don't think such face names really help at all, they just > make the source code ugly. Well, FWIW, I disagree. -- Kim F. Storm http://www.cua.dk