GNU bug report logs -
#75707
29.4; Bad face definitions in shell.el
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75707 in the body.
You can then email your comments to 75707 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75707
; Package
emacs
.
(Mon, 20 Jan 2025 23:31:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Anders Lindgren <andlind <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 20 Jan 2025 23:31:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (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 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75707
; Package
emacs
.
(Tue, 21 Jan 2025 00:01:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 75707 <at> debbugs.gnu.org (full text, mbox):
Anders Lindgren <andlind <at> gmail.com> writes:
> 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.
I think these have been fixed on master, in commit b9ebacf40345. We now
also warn for such cases, since commit 8d0c8076c3f2. This will wait
until Emacs 31, however.
Could you please take a look and see if that resolves this problem?
Added tag(s) moreinfo.
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 21 Jan 2025 02:31:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75707
; Package
emacs
.
(Thu, 23 Jan 2025 20:09:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 75707 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi!
Yes, that looks perfect. You can close this issue.
/ Anders
On Tue, Jan 21, 2025 at 1:00 AM Stefan Kangas <stefankangas <at> gmail.com>
wrote:
> Anders Lindgren <andlind <at> gmail.com> writes:
>
> > 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.
>
> I think these have been fixed on master, in commit b9ebacf40345. We now
> also warn for such cases, since commit 8d0c8076c3f2. This will wait
> until Emacs 31, however.
>
> Could you please take a look and see if that resolves this problem?
>
[Message part 2 (text/html, inline)]
Reply sent
to
Stefan Kangas <stefankangas <at> gmail.com>
:
You have taken responsibility.
(Thu, 23 Jan 2025 21:27:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Anders Lindgren <andlind <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 23 Jan 2025 21:27:01 GMT)
Full text and
rfc822 format available.
Message #18 received at 75707-done <at> debbugs.gnu.org (full text, mbox):
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.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 21 Feb 2025 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 175 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.