From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Default font 'default have no corresponding variable Date: Mon, 18 Feb 2008 11:48:44 -0500 Message-ID: References: <47B985B2.1070505@gmail.com> <87k5l2o0er.fsf@catnip.gol.com> <47B9AB51.7070002@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1203353361 11774 80.91.229.12 (18 Feb 2008 16:49:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Feb 2008 16:49:21 +0000 (UTC) Cc: Emacs Devel , Miles Bader To: "Lennart Borgman \(gmail\)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 18 17:49:45 2008 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.50) id 1JR9BQ-0003Go-8R for ged-emacs-devel@m.gmane.org; Mon, 18 Feb 2008 17:49:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JR9Av-0002cL-MN for ged-emacs-devel@m.gmane.org; Mon, 18 Feb 2008 11:49:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JR9Ap-0002ae-Uw for emacs-devel@gnu.org; Mon, 18 Feb 2008 11:49:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JR9Ao-0002ZH-GY for emacs-devel@gnu.org; Mon, 18 Feb 2008 11:48:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JR9Ao-0002Yx-8y for emacs-devel@gnu.org; Mon, 18 Feb 2008 11:48:58 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JR9Ak-0008VM-Kw; Mon, 18 Feb 2008 11:48:54 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAMtFuUfO+KMJdGdsb2JhbACQVwEwmwqBAg X-IronPort-AV: E=Sophos;i="4.25,372,1199682000"; d="scan'208";a="14666176" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 18 Feb 2008 11:48:52 -0500 Original-Received: from pastel.home ([206.248.163.9]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id YSO61352; Mon, 18 Feb 2008 11:48:52 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 18E408153; Mon, 18 Feb 2008 11:48:44 -0500 (EST) In-Reply-To: <47B9AB51.7070002@gmail.com> (Lennart Borgman's message of "Mon, 18 Feb 2008 16:59:13 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:89494 Archived-At: >> Why should there be a "corresponding variable"? > Maybe I got this wrong, I thought that there usually were a variable with > the same name as the face and that the variable value was the face > symbol. But maybe that is just used for faces defined specific uses in > Emacs libraries? No. The only there is w.r.t vars and faces is that font-lock's author originally decided to provide both font-lock-FOO-face faces and font-lock-FOO-face variables where the variable's value points to the face, so that you can use font-lock-FOO-face or 'font-lock-FOO-face and get the same result. Basically it makes the font-lock-FOO-face symbol (used to refer to the face) self-quoting. And since most font-lock rules use the first form rather than the second, you get the added benefit that the extra-indirection through the variable can be made buffer-local so you can "change faces" on a buffer-by-buffer basis (which is usually not possible in Emacs where faces can only be changed on a frame-by-frame basis). In any case, buffer-local faces should be added to Emacs (there are plans to do that, although they don't seem to be going anywhere, sadly), and variables pointing to faces are generally deprecated unless maybe they're used in font-lock rules where avoiding the ' can be marginally convenient. > But anyway, as I wrote, libraries written for XEmacs often tends to assume > that the variable default exist (and points to a face symbol I believe). `xemacs -q' tells me that `default' indeed exists but has value "void". Not sure what that means. It seems not to have any equivalent in Emacs. I'd never heard of it until now, so it can't be that used "often". Stefan