From: Markus Triska <triska@metalevel.at>
To: 45428@debbugs.gnu.org
Subject: bug#45428: 27.1; (quote (quote (quote ...))) unexpectedly works as anonymous face
Date: Fri, 25 Dec 2020 13:34:21 +0100 [thread overview]
Message-ID: <m2tusa3vzm.fsf@metalevel.at> (raw)
In 39.12 Faces, the Emacs Lisp documentation states:
One way to represent a face is as a property list of attributes,
like ‘(:foreground "red" :weight bold)’. Such a list is called an
“anonymous face”.
And according to 5.9 Property Lists, a property list "is a list of
paired elements.".
Specifying the anonymous face (:height 10.0), i.e., a property list,
works exactly as intended and documented when we invoke Emacs with:
$ emacs -Q --eval '(font-lock-mode 0)' \
--eval "(insert (propertize \
\"hello\" \
'face (quote (:height 10.0))))"
Writing (quote (:height 10.0)) is equal to writing '(:height 10.0):
(equal (quote (:height 10.0)) '(:height 10.0))
==> t
However, using multiple nested (quote ...) forms is not equivalent to
using a single quote in general:
(equal (quote (quote (:height 10.0))) '(:height 10.0))
==> nil
Yet, wrapping the face within multiple nested (quote ...) forms
unexpectedly yields the same visual result as using a single quote form,
namely (again) an enlarged "hello":
$ emacs -Q --eval '(font-lock-mode 0)' \
--eval "(insert (propertize \
\"hello\" \
'face (quote (quote '(:height 10.0)))))"
In this case, the anonymous face is not specified as a property list,
but as a symbolic expression of the form (quote (quote (quote ...))),
and still works. Is this the intended result, and can we rely on it? If
so, could you please document it?
Issue #35005 is related to this.
Thank you a lot!
Markus
In GNU Emacs 27.1 (build 1, x86_64-apple-darwin15.3.0, X toolkit, Xaw scroll bars)
of 2020-12-12 built on mac
Windowing system distributor 'The X.Org Foundation', version 11.0.11502000
System Description: Mac OS X 10.11.3
next reply other threads:[~2020-12-25 12:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-25 12:34 Markus Triska [this message]
2020-12-26 22:19 ` bug#45428: 27.1; (quote (quote (quote ...))) unexpectedly works as anonymous face Lars Ingebrigtsen
2020-12-27 4:16 ` Stefan Kangas
2020-12-27 4:47 ` Drew Adams
2020-12-27 8:38 ` Markus Triska
2020-12-27 17:52 ` Eli Zaretskii
2020-12-28 19:58 ` Andreas Schwab
[not found] <<m2tusa3vzm.fsf@metalevel.at>
[not found] ` <<87eejc9pnm.fsf@gnus.org>
[not found] ` <<CADwFkm=Q9P-a+PJdiQzGWU9PkV1BhTEw9V4GPcFRAnuaFiUNVg@mail.gmail.com>
[not found] ` <<5e99c39b-b67b-4184-a890-2cae38fb40de@default>
[not found] ` <<87a6tzk5iv.fsf@metalevel.at>
[not found] ` <<83h7o7kufk.fsf@gnu.org>
2020-12-27 19:06 ` Drew Adams
2020-12-27 19:18 ` Eli Zaretskii
[not found] <<<m2tusa3vzm.fsf@metalevel.at>
[not found] ` <<<87eejc9pnm.fsf@gnus.org>
[not found] ` <<<CADwFkm=Q9P-a+PJdiQzGWU9PkV1BhTEw9V4GPcFRAnuaFiUNVg@mail.gmail.com>
[not found] ` <<<5e99c39b-b67b-4184-a890-2cae38fb40de@default>
[not found] ` <<<87a6tzk5iv.fsf@metalevel.at>
[not found] ` <<<83h7o7kufk.fsf@gnu.org>
[not found] ` <<975c150b-99aa-4143-b057-8b5ec7caec19@default>
[not found] ` <<838s9jkqh7.fsf@gnu.org>
2020-12-27 19:56 ` Drew Adams
2020-12-28 13:43 ` Eli Zaretskii
[not found] <<<<m2tusa3vzm.fsf@metalevel.at>
[not found] ` <<<<87eejc9pnm.fsf@gnus.org>
[not found] ` <<<<CADwFkm=Q9P-a+PJdiQzGWU9PkV1BhTEw9V4GPcFRAnuaFiUNVg@mail.gmail.com>
[not found] ` <<<<5e99c39b-b67b-4184-a890-2cae38fb40de@default>
[not found] ` <<<<87a6tzk5iv.fsf@metalevel.at>
[not found] ` <<<<83h7o7kufk.fsf@gnu.org>
[not found] ` <<<975c150b-99aa-4143-b057-8b5ec7caec19@default>
[not found] ` <<<838s9jkqh7.fsf@gnu.org>
[not found] ` <<fc9aea86-b07a-4f81-a442-019f610bb73a@default>
[not found] ` <<835z4mkpvz.fsf@gnu.org>
2020-12-28 17:45 ` Drew Adams
2020-12-28 17:49 ` Eli Zaretskii
2020-12-28 18:23 ` Eli Zaretskii
[not found] <<<<<m2tusa3vzm.fsf@metalevel.at>
[not found] ` <<<<<87eejc9pnm.fsf@gnus.org>
[not found] ` <<<<<CADwFkm=Q9P-a+PJdiQzGWU9PkV1BhTEw9V4GPcFRAnuaFiUNVg@mail.gmail.com>
[not found] ` <<<<<5e99c39b-b67b-4184-a890-2cae38fb40de@default>
[not found] ` <<<<<87a6tzk5iv.fsf@metalevel.at>
[not found] ` <<<<<83h7o7kufk.fsf@gnu.org>
[not found] ` <<<<975c150b-99aa-4143-b057-8b5ec7caec19@default>
[not found] ` <<<<838s9jkqh7.fsf@gnu.org>
[not found] ` <<<fc9aea86-b07a-4f81-a442-019f610bb73a@default>
[not found] ` <<<835z4mkpvz.fsf@gnu.org>
[not found] ` <<5dfff982-e496-46fe-9efd-1e0edd4f0be8@default>
[not found] ` <<83o8idkehc.fsf@gnu.org>
[not found] ` <<83mtxxkcwk.fsf@gnu.org>
2020-12-28 18:54 ` Drew Adams
2020-12-28 19:34 ` Eli Zaretskii
[not found] <<<<<<m2tusa3vzm.fsf@metalevel.at>
[not found] ` <<<<<<87eejc9pnm.fsf@gnus.org>
[not found] ` <<<<<<CADwFkm=Q9P-a+PJdiQzGWU9PkV1BhTEw9V4GPcFRAnuaFiUNVg@mail.gmail.com>
[not found] ` <<<<<<5e99c39b-b67b-4184-a890-2cae38fb40de@default>
[not found] ` <<<<<<87a6tzk5iv.fsf@metalevel.at>
[not found] ` <<<<<<83h7o7kufk.fsf@gnu.org>
[not found] ` <<<<<975c150b-99aa-4143-b057-8b5ec7caec19@default>
[not found] ` <<<<<838s9jkqh7.fsf@gnu.org>
[not found] ` <<<<fc9aea86-b07a-4f81-a442-019f610bb73a@default>
[not found] ` <<<<835z4mkpvz.fsf@gnu.org>
[not found] ` <<<5dfff982-e496-46fe-9efd-1e0edd4f0be8@default>
[not found] ` <<<83o8idkehc.fsf@gnu.org>
[not found] ` <<<83mtxxkcwk.fsf@gnu.org>
[not found] ` <<9a600718-7caf-4ad0-a664-0ebafba63e57@default>
[not found] ` <<83im8lk9lp.fsf@gnu.org>
2020-12-28 20:44 ` Drew Adams
2020-12-29 14:53 ` Eli Zaretskii
2020-12-29 16:40 ` Markus Triska
2020-12-29 17:17 ` Eli Zaretskii
2020-12-29 18:39 ` Markus Triska
2020-12-29 19:41 ` Eli Zaretskii
2020-12-29 18:27 ` Drew Adams
2020-12-29 19:39 ` Eli Zaretskii
2020-12-30 2:54 ` Lars Ingebrigtsen
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=m2tusa3vzm.fsf@metalevel.at \
--to=triska@metalevel.at \
--cc=45428@debbugs.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).