unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
[parent not found: <<<<<<m2tusa3vzm.fsf@metalevel.at>]
[parent not found: <<<<<m2tusa3vzm.fsf@metalevel.at>]
[parent not found: <<<m2tusa3vzm.fsf@metalevel.at>]
[parent not found: <<m2tusa3vzm.fsf@metalevel.at>]
* bug#45428: 27.1; (quote (quote (quote ...))) unexpectedly works as anonymous face
@ 2020-12-25 12:34 Markus Triska
  2020-12-26 22:19 ` Lars Ingebrigtsen
  2020-12-28 19:58 ` Andreas Schwab
  0 siblings, 2 replies; 25+ messages in thread
From: Markus Triska @ 2020-12-25 12:34 UTC (permalink / raw)
  To: 45428

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






^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2020-12-30  2:54 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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                   ` bug#45428: 27.1; (quote (quote (quote ...))) unexpectedly works as anonymous face 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>
     [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
     [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>
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>
2020-12-27 19:06           ` Drew Adams
2020-12-27 19:18             ` Eli Zaretskii
2020-12-25 12:34 Markus Triska
2020-12-26 22:19 ` 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

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