GNU bug report logs - #75707
29.4; Bad face definitions in shell.el

Previous Next

Package: emacs;

Reported by: Anders Lindgren <andlind <at> gmail.com>

Date: Mon, 20 Jan 2025 23:31:03 UTC

Severity: normal

Tags: moreinfo

Found in version 29.4

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#75707: closed (29.4; Bad face definitions in shell.el)
Date: Thu, 23 Jan 2025 21:27:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 23 Jan 2025 15:25:53 -0600
with message-id <CADwFkmkW8S6Dqh9ZPSugONEfg_e+ajKSVD5F5csqa5cSy3TwFQ <at> mail.gmail.com>
and subject line Re: bug#75707: 29.4; Bad face definitions in shell.el
has caused the debbugs.gnu.org bug report #75707,
regarding 29.4; Bad face definitions in shell.el
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
75707: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75707
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Anders Lindgren <andlind <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.4; Bad face definitions in shell.el
Date: Mon, 20 Jan 2025 23:29:07 +0100
[Message part 3 (text/plain, inline)]
In `shell.el', there are a number of face definitions on the form:

(defface shell-highlight-undef-alias-face
  '((t :inherit 'font-lock-variable-name-face))
  "Face used for shell command aliases."
  :group 'shell
  :version "29.1")

Note that `font-lock-variable-name-face' is quoted, which it shouldn't be.

On one hand, Emacs seems to be able to display the face properly. On the
other hand, when trying to retrieve the face properties using
`face-attribute', it fails.

In the example below, this is demonstrated. If you evaluate each line in
*scratch* you will see this. (When inserting TEST into be buffer, the
'font-lock-face' property is used since the `face' property would
immediately be overwritten by font-lock.)

-------------------
(defface correct-inherit
  '((t :inherit font-lock-variable-name-face))
  "Correct inherited definition.")

(insert (propertize "TEST" 'font-lock-face 'correct-inherit))

(message "%s" (face-attribute 'correct-inherit :foreground nil t))

;; -----

(defface bad-inherit
  '((t :inherit 'font-lock-variable-name-face))
  "Correct inherited definition.")

(insert (propertize "TEST" 'font-lock-face 'bad-inherit))

(message "%s" (face-attribute 'bad-inherit :foreground nil t))
-------------------

I guess the main priority is to fix `shell.el', but it would be nice if
`face-attributes' would be able to retrieve the attribute values.

Sincerely,
    Anders Lindgren

Ps. I'm a long time Emacs user and developer with good knowledge regarding
faces.




In GNU Emacs 29.4 (build 1, aarch64-apple-darwin21.6.0, NS
 appkit-2113.60 Version 12.6.6 (Build 21G646)) of 2024-08-02 built on
 armbob.lan
Windowing system distributor 'Apple', version 10.3.2575
System Description:  macOS 15.1.1

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules 'CFLAGS=-DFD_SETSIZE=10000
 -DDARWIN_UNLIMITED_SELECT' --with-x-toolkit=no'

Configured features:
ACL GLIB GMP GNUTLS JPEG JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER
PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER ZLIB

Important settings:
  value of $LANG: sv_SE.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 37908 7520)
 (symbols 48 5047 0)
 (strings 32 13106 1867)
 (string-bytes 1 376429)
 (vectors 16 10396)
 (vector-slots 8 163820 11918)
 (floats 8 22 25)
 (intervals 56 304 0)
 (buffers 984 11))
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: Stefan Kangas <stefankangas <at> gmail.com>
To: Anders Lindgren <andlind <at> gmail.com>
Cc: 75707-done <at> debbugs.gnu.org
Subject: Re: bug#75707: 29.4; Bad face definitions in shell.el
Date: Thu, 23 Jan 2025 15:25:53 -0600
Anders Lindgren <andlind <at> gmail.com> writes:

> Yes, that looks perfect. You can close this issue.

Thanks for checking!  I'm therefore closing this bug report.


This bug report was last modified 176 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.