From: Juanma Barranquero <lektu@terra.es>
Subject: Is (propertize "test" 'face '(foreground-color . "red")) valid?
Date: Mon, 08 Jul 2002 16:59:03 +0200 [thread overview]
Message-ID: <20020708165246.1B41.LEKTU@terra.es> (raw)
....or should it be
(propertize "test" 'face '((foreground-color . "red")))
?
From the Elisp reference (Text Properties / Special Properties):
> `face'
> You can use the property `face' to control the font and color of
> text. *Note Faces::, for more information.
>
> In the simplest case, the value is a face name. It can also be a
> list; then each element can be any of these possibilities;
>
> * A face name (a symbol or string).
>
> * Starting in Emacs 21, a property list of face attributes.
> This has the form (KEYWORD VALUE ...), where each KEYWORD is a
> face attribute name and VALUE is a meaningful value for that
> attribute. With this feature, you do not need to create a
> face each time you want to specify a particular attribute for
> certain text. *Note Face Attributes::.
>
> * A cons cell of the form `(foreground-color . COLOR-NAME)' or
> `(background-color . COLOR-NAME)'. These elements specify
> just the foreground color or just the background color.
>
> `(foreground-color . COLOR-NAME)' is equivalent to
> `(:foreground COLOR-NAME)', and likewise for the background.
>
To follow the docs, cons-cell values for the `face' property shouldn't
be valid. However, they work (at least, creating such a test string and
inserting it into a fundamental-mode buffer shows it colored).
Documentation bug, obsolete feature, or what?
/L/e/k/t/u
reply other threads:[~2002-07-08 14:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20020708165246.1B41.LEKTU@terra.es \
--to=lektu@terra.es \
/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).