From: "Drew Adams" <drew.adams@oracle.com>
To: <rms@gnu.org>, "'Lennart Borgman \(gmail\)'" <lennart.borgman@gmail.com>
Cc: miles@gnu.org, emacs-devel@gnu.org
Subject: RE: Default font 'default have no corresponding variable
Date: Tue, 19 Feb 2008 19:51:46 -0800 [thread overview]
Message-ID: <008301c87373$eadf38b0$0600a8c0@us.oracle.com> (raw)
In-Reply-To: <E1JRR8H-0005tr-F4@fencepost.gnu.org>
> Maybe we should work harder to document the fact that we do not want
> such variables. Where would such info have reached you better?
>
> How about if we put comments in and among the variable definitions in
> font-lock.el saying not to imitate that practice.
I think the place to discuss this is in the Elisp manual, in one of the
sections about faces. This is really about understanding what a face is,
IMO.
FWIW, I have a slightly different take on the practice to recommend and the
reasons to give for that recommendation.
I agree with the recommended practice of defining and using faces, not face
variables, in general - and I follow it. However, I don't agree that the
only case for defining and using face variables is the legacy case of the
font-lock code.
The use case I see, which, again, is not the usual case, is when you want to
make it easy for code to temporarily use a particular face. It is very easy
for some code to dynamically bind a face variable and cause subsequently
executed code to use that face. Getting the same effect with faces (without
a face variable) can make for uglier code, IMO.
Just one opinion. I'm not interested in arguing about that. I agree that we
should make it clear that you generally should not define face variables.
And I think the place to communicate that guideline is the Elisp doc, not
just comments in the code.
next prev parent reply other threads:[~2008-02-20 3:51 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)
2008-02-19 11:59 ` Richard Stallman
2008-02-20 3:51 ` Drew Adams [this message]
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='008301c87373$eadf38b0$0600a8c0@us.oracle.com' \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=lennart.borgman@gmail.com \
--cc=miles@gnu.org \
--cc=rms@gnu.org \
/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).