GNU bug report logs - #43001
27.1; bad fontification of Common Lisp uninterned symbols

Previous Next

Package: emacs;

Reported by: Robert Brown <robert.brown <at> gmail.com>

Date: Sun, 23 Aug 2020 20:09:01 UTC

Severity: normal

Tags: fixed

Found in version 27.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 43001 in the body.
You can then email your comments to 43001 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#43001; Package emacs. (Sun, 23 Aug 2020 20:09:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Brown <robert.brown <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 23 Aug 2020 20:09:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Robert Brown <robert.brown <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; bad fontification of Common Lisp uninterned symbols
Date: Sun, 23 Aug 2020 16:08:25 -0400
Git commit bae7a63b808 introduced fontification of Common Lisp
uninterned symbols using this code:

         ;; Uninterned symbols, e.g., (defpackage #:my-package ...)
         ;; must come before keywords below to have effect
         (,(concat "\\(#:\\)\\(" lisp-mode-symbol-regexp "\\)")
           (1 font-lock-comment-delimiter-face)
           (2 font-lock-doc-face))

An uninterned symbol looks like "#:my-symbol".  The change causes "#:"
to be displayed with one face and "my-symbol" with another.  That's bad.
Fontification signals a semantic property The entire thing is a symbol,
so it should be displayed using one face.  What face should we use?
Keyword symbols are displayed using font-lock-builtin-face, so that's
what I would use.

Why I'm commenting on Lisp fontification ...  Symbols that start with an
ampersand character are currently being displayed using
font-lock-type-face, which doesn't make much sense, since they too are
symbols.  Perhaps they should be displayed using font-lock-builtin-face
too.



In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu)
 of 2020-08-16 built on chuwi
System Description: Ubuntu 18.04.5 LTS

Recent messages:

Configured using:
 'configure --without-x
 --prefix=/home/brown/local/software/package/emacs-27.1'

Configured features:
SOUND NOTIFY INOTIFY GNUTLS ZLIB XIM MODULES THREADS JSON PDUMPER GMP

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Load-path shadows:
/home/brown/local/software/source/dash/dash-functional hides
/home/brown/.emacs.d/elpa/dash-functional-20191109.1327/dash-functional
/home/brown/local/software/source/dash/dash hides
/home/brown/.emacs.d/elpa/dash-20191109.1327/dash
/home/brown/local/software/source/markdown-mode/markdown-mode hides
/home/brown/.emacs.d/elpa/markdown-mode-20190802.2215/markdown-mode

Features:
(shadow sort mail-extr warnings emacsbug message rmc puny dired
dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg epg-config
gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
term/xterm xterm vm-autoloads vm-version vm-vars cc-styles cc-align
cc-engine cc-vars cc-defs slime-autoloads regexp-opt edmacro kmacro
paren finder-inf info tool-bar package easymenu browse-url url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select mouse jit-lock font-lock syntax
facemenu font-core term/tty-colors frame minibuffer cl-generic 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 charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads inotify
multi-tty make-network-process emacs)

Memory information:
((conses 16 102351 27442)
 (symbols 48 11628 5)
 (strings 32 32543 5246)
 (string-bytes 1 1146866)
 (vectors 16 12405)
 (vector-slots 8 142487 34066)
 (floats 8 32 537)
 (intervals 56 184 0)
 (buffers 1000 12))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43001; Package emacs. (Mon, 24 Aug 2020 12:37:02 GMT) Full text and rfc822 format available.

Message #8 received at 43001 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Robert Brown <robert.brown <at> gmail.com>
Cc: 43001 <at> debbugs.gnu.org
Subject: Re: bug#43001: 27.1; bad fontification of Common Lisp uninterned
 symbols
Date: Mon, 24 Aug 2020 14:35:51 +0200
Robert Brown <robert.brown <at> gmail.com> writes:

> An uninterned symbol looks like "#:my-symbol".  The change causes "#:"
> to be displayed with one face and "my-symbol" with another.  That's bad.
> Fontification signals a semantic property The entire thing is a symbol,
> so it should be displayed using one face.  What face should we use?
> Keyword symbols are displayed using font-lock-builtin-face, so that's
> what I would use.

Makes sense; I've now made this change in Emacs 28.

> Why I'm commenting on Lisp fontification ...  Symbols that start with an
> ampersand character are currently being displayed using
> font-lock-type-face, which doesn't make much sense, since they too are
> symbols.  Perhaps they should be displayed using font-lock-builtin-face
> too.

I think it's fine to use that face in Lisp mode (since it's largely
unused in Lisp mode otherwise).  The face names aren't very descriptive,
though.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 24 Aug 2020 12:37:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 43001 <at> debbugs.gnu.org and Robert Brown <robert.brown <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 24 Aug 2020 12:37:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 22 Sep 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 355 days ago.

Previous Next


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