From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: checkdoc (was: mh-e 6.2 imminent) Date: Mon, 28 Oct 2002 18:22:43 -0500 Sender: emacs-devel-admin@gnu.org Message-ID: <20021028232243.GA13402@gnu.org> References: <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> <5xadkyw3ri.fsf@kfs2.cua.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035847451 28280 80.91.224.249 (28 Oct 2002 23:24:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 28 Oct 2002 23:24:11 +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 186JEu-0007Ls-00 for ; Tue, 29 Oct 2002 00:24:08 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 186JJF-0003Qj-00 for ; Tue, 29 Oct 2002 00:28:37 +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 186JE8-0007HT-00; Mon, 28 Oct 2002 18:23:20 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 186JDi-0006t5-00 for emacs-devel@gnu.org; Mon, 28 Oct 2002 18:22:54 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 186JDg-0006pL-00 for emacs-devel@gnu.org; Mon, 28 Oct 2002 18:22:53 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10) id 186JDg-0006p0-00 for emacs-devel@gnu.org; Mon, 28 Oct 2002 18:22:52 -0500 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.10) id 186JDX-0003q9-00; Mon, 28 Oct 2002 18:22:43 -0500 Original-To: "Kim F. Storm" Content-Disposition: inline In-Reply-To: <5xadkyw3ri.fsf@kfs2.cua.dk> User-Agent: Mutt/1.3.28i Blat: Foop 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:8863 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8863 On Tue, Oct 29, 2002 at 12:19:13AM +0100, Kim F. Storm wrote: > 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 of the property I've already noted -- that uses of constant faces almost always occur in contexts where the use of a face is _explicit_, e.g. accompanying a variable or function called `...-face' -- I can do this: grep "face.*'region" ... which in fact works quite well. One way you can test this is to pick some existing face called `foo-face', and grep for both "foo-face" and "face.*foo" in the sources. It's best to pick a face that _doesn't_ have an identically-named variable, because otherwise you tend to get lots of false hits in the `foo-face' case [this is a problem, incidentally, with faces like `foo-face' -- code such as font-lock tends to be even more confusing because there are _identical_ symbols being used for both variables and faces, in ways that are not that easy to distinguish at first glance; I think it would actually be _more_ clear if only the variables were called `foo-face'] Here's an example: First using the `-face' suffix: grep -nH "gnus-cite-attribution-face" lisp/gnus/*.el lisp/gnus/gnus-cite.el:126:(defface gnus-cite-attribution-face '((t lisp/gnus/gnus-cite.el:130:(defcustom gnus-cite-attribution-face 'gnus-cite-attribution-face lisp/gnus/gnus-cite.el:317:corresponding citation merged with `gnus-cite-attribution-face'. lisp/gnus/gnus-cite.el:367: (gnus-cite-add-face number skip gnus-cite-attribution-face)) lisp/gnus/gnus-cite.el:375: (gnus-cite-add-face number skip gnus-cite-attribution-face))))) Now without it: grep -nH "face.*gnus-cite-attribution" lisp/gnus/*.el lisp/gnus/gnus-cite.el:126:(defface gnus-cite-attribution-face '((t lisp/gnus/gnus-cite.el:130:(defcustom gnus-cite-attribution-face 'gnus-cite-attribution-face lisp/gnus/gnus-cite.el:367: (gnus-cite-add-face number skip gnus-cite-attribution-face)) lisp/gnus/gnus-cite.el:375: (gnus-cite-add-face number skip gnus-cite-attribution-face))))) Note that the second catches all the same cases except a mention in a doc-string. -Miles -- Come now, if we were really planning to harm you, would we be waiting here, beside the path, in the very darkest part of the forest?