From: Markus Triska <triska@metalevel.at>
To: 39812@debbugs.gnu.org
Subject: bug#39812: 26.1; face-remapping-alist is sometimes set to an unexpected value
Date: Thu, 27 Feb 2020 20:10:22 +0100 [thread overview]
Message-ID: <m236avalsx.fsf@metalevel.at> (raw)
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)
and then evaluate the buffer with M-x eval-buffer RET.
Then, inspect the value of face-remapping-alist with:
C-h v face-remapping-alist RET
In my case, the value is: '((default italic bold)).
How can this be explained? The final form (a) is supposed to set
face-remapping-alist to '((default bold)), and hence I expect the
value of face-remapping-alist to be '((default bold)) instead.
When I comment out the first invocation of "(a)", i.e., when I write:
(defun a ()
(set (make-local-variable 'face-remapping-alist)
'((default bold))))
;; (a) ; now this line is commented out
(face-remap-add-relative 'default 'italic)
(a)
and then evaluate the buffer, then face-remapping-alist is set to
'((default bold)), which is the expected value.
As guideline for the definition of the function `a', I used the snippet
from the variable description of face-remapping-alist, which states:
"For instance, the mode my-mode could define a
face ‘my-mode-default’, and then in the mode setup function, do:
(set (make-local-variable 'face-remapping-alist)
'((default my-mode-default))))."
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?
Thank you and all the best!
Markus
In GNU Emacs 26.1 (build 1, x86_64-apple-darwin15.3.0, X toolkit, Xaw scroll bars)
of 2018-09-22 built on mt-mb
Windowing system distributor 'The X.Org Foundation', version 11.0.11502000
Configured using:
'configure --prefix=/opt/local --without-ns --without-dbus
--without-gconf --without-libotf --without-m17n-flt --without-gpm
--with-gnutls --with-xml2 --with-modules --infodir
/opt/local/share/info/emacs --with-x-toolkit=lucid --without-xaw3d
--without-imagemagick --with-xpm --with-jpeg --with-tiff --with-gif
--with-png --with-lcms2 --without-rsvg --with-xft 'CFLAGS=-pipe -Os
-arch x86_64' CPPFLAGS=-I/opt/local/include 'LDFLAGS=-L/opt/local/lib
-Wl,-headerpad_max_install_names -lfreetype -lfontconfig -Wl,-no_pie
-arch x86_64''
Configured features:
XPM JPEG TIFF GIF PNG GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT
ZLIB TOOLKIT_SCROLL_BARS LUCID X11 MODULES THREADS LCMS2
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
next reply other threads:[~2020-02-27 19:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 19:10 Markus Triska [this message]
2020-02-27 19:57 ` bug#39812: 26.1; face-remapping-alist is sometimes set to an unexpected value Noam Postavsky
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=m236avalsx.fsf@metalevel.at \
--to=triska@metalevel.at \
--cc=39812@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).