unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: facemenu-unlisted-faces
Date: Fri, 14 Jul 2006 08:06:24 -0700	[thread overview]
Message-ID: <EIENLHALHGIMHGDOLMIMGEKFCJAA.drew.adams@oracle.com> (raw)
In-Reply-To: <878xmx9gwk.fsf@catnip.gol.com>

    > IOW, the usefulness you describe for face `fixed-pitch' is an
    > argument for its existence as a face, but as a *constant* face.
    > Since it is specifically intended to have a constant appearance
    > (its particular appearance is its raison d'etre), changing its
    > appearance should somehow be discouraged or prevented.

    That doesn't make the least bit of sense -- 90% of the _reason_ for
    having a face like `fixed-pitch' is so that the user can change it!

In a very narrow way (see below). 99.99% of the definition of this face is
*not* intended to be changed by users or code.

    There are various place in emacs that want a fixed-pitch font: by
    inheriting from `fixed-pitch', there's no need for the user to customize
    all those faces if he wants to change which fixed-pitch font gets used
    in general; he can just customize `fixed-pitch'.

I already mentioned the advantage of inheritance from `fixed-pitch'. That's
part of the "argument for its existence as a face". The same advantage is
present, however, if you inherit from a constant face.

Anyway, you raise a good point, even if it is a nuance. Face `fixed-pitch'
is a bit different from faces such as `bold'. In the case of `fixed-pitch',
the intention is not that the face definition (and its appearance) remain
100% constant, but that it remain constant *except* for the :font-family
attribute, and for the :font-family, the intention is that only a
fixed-pitch family be allowed. IOW, you can substitute a different
fixed-pitch font family for Courier, but that's the only way you're supposed
to change the definition of `fixed-pitch'. It's intended to be a very
constant face, but there is a tiny exception.

We're far from being able to specify fine-grained constraints like that,
alas. Which do you think is more important, 1) the fact that the face is
(intended to be) essentially constant (all attributes except :font-family,
and even that is restricted), or 2) the fact that some variability is
allowed? Would you toss it in the `dired-flagged' camp or the `bold' (face)
camp - `defface' or `defconst-face'?

I'd say, given the lack of a mechanism to precisely state and control the
intention, that the best solution is to use an analog of `defconst', and to
express the particular exceptions (your nuance) in the doc string.

There is a world of difference between the intention behind `fixed-pitch'
and the intention behind `dired-flagged'. There is less difference between
face `fixed-pitch and a face such as `bold' that is intended to remain 100%
constant. `fixed-pitch' is a face whose meaning, like that of face `bold',
is based on its appearance, not on its use. Its appearance is (intended to
be) essentially constant.

  reply	other threads:[~2006-07-14 15:06 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-01 23:55 facemenu-unlisted-faces Richard Stallman
2006-07-02  0:33 ` facemenu-unlisted-faces Chong Yidong
2006-07-02  3:17   ` facemenu-unlisted-faces Drew Adams
2006-07-02 22:30     ` facemenu-unlisted-faces Richard Stallman
2006-07-02 23:50       ` facemenu-unlisted-faces Drew Adams
2006-07-03  7:44         ` facemenu-unlisted-faces David Kastrup
2006-07-03 14:34           ` facemenu-unlisted-faces Drew Adams
2006-07-04 12:55             ` facemenu-unlisted-faces Richard Stallman
2006-07-04 18:07               ` facemenu-unlisted-faces Drew Adams
2006-07-05 14:51                 ` facemenu-unlisted-faces Richard Stallman
2006-07-05 16:55                   ` facemenu-unlisted-faces Drew Adams
2006-07-06 13:32                     ` facemenu-unlisted-faces Richard Stallman
2006-07-06 15:52                       ` facemenu-unlisted-faces Drew Adams
2006-07-03 15:11           ` facemenu-unlisted-faces Chong Yidong
2006-07-03 16:48             ` facemenu-unlisted-faces Drew Adams
2006-07-04 12:55               ` facemenu-unlisted-faces Richard Stallman
2006-07-04 19:19                 ` facemenu-unlisted-faces Drew Adams
2006-07-05 14:51                   ` facemenu-unlisted-faces Richard Stallman
2006-07-05 16:54                     ` facemenu-unlisted-faces Drew Adams
2006-07-06 13:32                       ` facemenu-unlisted-faces Richard Stallman
2006-07-06 15:52                         ` facemenu-unlisted-faces Drew Adams
2006-07-07 19:30                           ` facemenu-unlisted-faces Richard Stallman
2006-07-07 22:49                             ` facemenu-unlisted-faces Drew Adams
2006-07-08 15:31                               ` facemenu-unlisted-faces Richard Stallman
2006-07-09  2:32                                 ` facemenu-unlisted-faces Drew Adams
2006-07-09  4:42                                   ` facemenu-unlisted-faces Miles Bader
2006-07-09  5:45                                     ` facemenu-unlisted-faces Drew Adams
2006-07-09 11:01                                       ` facemenu-unlisted-faces Miles Bader
2006-07-09 18:19                                         ` facemenu-unlisted-faces Drew Adams
2006-07-09 11:03                                       ` facemenu-unlisted-faces Robert J. Chassell
2006-07-09 18:19                                         ` facemenu-unlisted-faces Drew Adams
2006-07-09 21:08                                           ` facemenu-unlisted-faces Robert J. Chassell
2006-07-09 19:03                                       ` facemenu-unlisted-faces Richard Stallman
2006-07-09 20:29                                         ` facemenu-unlisted-faces Drew Adams
2006-07-09 19:03                                   ` facemenu-unlisted-faces Richard Stallman
2006-07-09 20:01                                     ` facemenu-unlisted-faces Drew Adams
2006-07-13  8:14                                   ` facemenu-unlisted-faces Sascha Wilde
2006-07-13 10:00                                     ` facemenu-unlisted-faces tomas
2006-07-13 10:49                                     ` facemenu-unlisted-faces Robert J. Chassell
2006-07-13 16:49                                     ` facemenu-unlisted-faces Drew Adams
2006-07-13 18:03                                       ` facemenu-unlisted-faces Miles Bader
2006-07-13 21:30                                         ` facemenu-unlisted-faces Drew Adams
2006-07-14  0:19                                           ` facemenu-unlisted-faces Miles Bader
2006-07-14 15:06                                             ` Drew Adams [this message]
2006-07-19  4:37                                               ` facemenu-unlisted-faces Miles Bader
2006-07-16  6:26                                           ` facemenu-unlisted-faces Richard Stallman
2006-07-16 17:33                                             ` facemenu-unlisted-faces Drew Adams
2006-07-17 16:06                                               ` facemenu-unlisted-faces Richard Stallman
2006-07-05 14:51                   ` facemenu-unlisted-faces Richard Stallman
2006-07-05 16:55                     ` facemenu-unlisted-faces Drew Adams
2006-07-09 14:12                   ` facemenu-unlisted-faces Richard Stallman
2006-07-09 18:19                     ` facemenu-unlisted-faces Drew Adams
2006-08-06  8:10     ` facemenu-unlisted-faces Drew Adams
2006-07-02 22:29   ` facemenu-unlisted-faces Richard Stallman
2006-07-03 14:34     ` facemenu-unlisted-faces Chong Yidong

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=EIENLHALHGIMHGDOLMIMGEKFCJAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /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).