From: Noam Postavsky <npostavs@gmail.com>
To: Markus Triska <triska@metalevel.at>
Cc: 39812@debbugs.gnu.org
Subject: bug#39812: 26.1; face-remapping-alist is sometimes set to an unexpected value
Date: Thu, 27 Feb 2020 14:57:56 -0500 [thread overview]
Message-ID: <858sknajln.fsf@gmail.com> (raw)
In-Reply-To: <m236avalsx.fsf@metalevel.at> (Markus Triska's message of "Thu, 27 Feb 2020 20:10:22 +0100")
Markus Triska <triska@metalevel.at> writes:
> To reproduce this issue, please start Emacs with "emacs -Q", then place
> the following forms in the appearing *scratch* buffer:
>
> (defun a ()
> (set (make-local-variable 'face-remapping-alist)
> '((default bold))))
>
> (a)
> (face-remap-add-relative 'default 'italic)
> (a)
face-remap-add-relative destructively modifies the list value, so
setting face-remapping-alist to a quoted literal gives unexpected
results like this. Similar to the example at the bottom of (info
"(elisp) Rearrangement")
> Is this still a recommended way to set this variable, should the above
> example work? Is there a reliable way to set face-remapping-alist to
> '((default bold)) in the function `a' so that the first example works?
(defun a ()
(set (make-local-variable 'face-remapping-alist)
(copy-tree '((default bold)))))
Or
(defun a ()
(set (make-local-variable 'face-remapping-alist)
(list (list 'default 'bold))))
next prev parent reply other threads:[~2020-02-27 19:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 19:10 bug#39812: 26.1; face-remapping-alist is sometimes set to an unexpected value Markus Triska
2020-02-27 19:57 ` Noam Postavsky [this message]
2020-02-28 7:15 ` Markus Triska
2020-03-05 12:48 ` Noam Postavsky
2020-03-29 1:33 ` Noam Postavsky
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=858sknajln.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=39812@debbugs.gnu.org \
--cc=triska@metalevel.at \
/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).