From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.bugs Subject: bug#39812: 26.1; face-remapping-alist is sometimes set to an unexpected value Date: Thu, 27 Feb 2020 20:10:22 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="118490"; mail-complaints-to="usenet@ciao.gmane.io" To: 39812@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 27 20:23:02 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j7OkO-000UgQ-R9 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Feb 2020 20:23:00 +0100 Original-Received: from localhost ([::1]:37214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7OkN-0006Td-Q7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Feb 2020 14:22:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44534) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7OiV-0004PU-S2 for bug-gnu-emacs@gnu.org; Thu, 27 Feb 2020 14:21:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7OiU-00063X-MC for bug-gnu-emacs@gnu.org; Thu, 27 Feb 2020 14:21:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54306) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j7OiU-00063I-IN for bug-gnu-emacs@gnu.org; Thu, 27 Feb 2020 14:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j7OiU-0005uZ-EE for bug-gnu-emacs@gnu.org; Thu, 27 Feb 2020 14:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Markus Triska Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Feb 2020 19:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39812 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.158283120622596 (code B ref -1); Thu, 27 Feb 2020 19:21:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Feb 2020 19:20:06 +0000 Original-Received: from localhost ([127.0.0.1]:60279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7Oha-0005sO-BG for submit@debbugs.gnu.org; Thu, 27 Feb 2020 14:20:06 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:38049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7OhY-0005sC-9h for submit@debbugs.gnu.org; Thu, 27 Feb 2020 14:20:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44276) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7OhW-0002lJ-UH for bug-gnu-emacs@gnu.org; Thu, 27 Feb 2020 14:20:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7OhU-0004OQ-NJ for bug-gnu-emacs@gnu.org; Thu, 27 Feb 2020 14:20:02 -0500 Original-Received: from [78.47.144.35] (port=46002 helo=metalevel.at) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j7OhU-0004Mq-GL for bug-gnu-emacs@gnu.org; Thu, 27 Feb 2020 14:20:00 -0500 Original-Received: from mt-mbpro.localdomain (localhost [127.0.0.1]) by metalevel.at (Postfix) with ESMTP id 873DF9E76D for ; Thu, 27 Feb 2020 20:10:23 +0100 (CET) Original-Received: by mt-mbpro.localdomain (Postfix, from userid 501) id DE66A108EE1E; Thu, 27 Feb 2020 20:10:22 +0100 (CET) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:176540 Archived-At: 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 =E2=80=98my-mode-default=E2=80=99, and then in the mode setup func= tion, 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 scrol= l bars) of 2018-09-22 built on mt-mb Windowing system distributor 'The X.Org Foundation', version 11.0.11502000 Configured using: 'configure --prefix=3D/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=3Dlucid --without-xaw3d --without-imagemagick --with-xpm --with-jpeg --with-tiff --with-gif --with-png --with-lcms2 --without-rsvg --with-xft 'CFLAGS=3D-pipe -Os -arch x86_64' CPPFLAGS=3D-I/opt/local/include 'LDFLAGS=3D-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