unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs Devel <emacs-devel@gnu.org>, Jason Rumney <jasonr@gnu.org>
Subject: Re: Default font 'default have no corresponding variable
Date: Mon, 18 Feb 2008 23:14:40 +0100	[thread overview]
Message-ID: <47BA0350.3050601@gmail.com> (raw)
In-Reply-To: <jwvablyfc8c.fsf-monnier+emacs@gnu.org>

Stefan Monnier wrote:
>>> 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.


Thanks Stefan and Jason,

It seems like I have been misunderstanding this a bit more than I 
usually do ;-)

Unfortunately I have been spreading my unwisdom a bit so I have to clear 
that out.

>> 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
> 




  parent reply	other threads:[~2008-02-18 22:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-18 13:18 Default font 'default have no corresponding variable Lennart Borgman (gmail)
2008-02-18 13:20 ` Lennart Borgman (gmail)
2008-02-18 13:25   ` Jason Rumney
2008-02-18 16:12     ` Lennart Borgman (gmail)
2008-02-18 13:32 ` Miles Bader
2008-02-18 15:59   ` Lennart Borgman (gmail)
2008-02-18 16:37     ` Jason Rumney
2008-02-18 16:48     ` Stefan Monnier
2008-02-18 20:37       ` Johan Bockgård
2008-02-18 21:13         ` Stefan Monnier
2008-02-18 22:14       ` Lennart Borgman (gmail) [this message]
2008-02-19 11:59     ` Richard Stallman
2008-02-20  3:51       ` Drew Adams
2008-02-20 16:44         ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47BA0350.3050601@gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=jasonr@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).