all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#43001: 27.1; bad fontification of Common Lisp uninterned symbols
@ 2020-08-23 20:08 Robert Brown
  2020-08-24 12:35 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Brown @ 2020-08-23 20:08 UTC (permalink / raw)
  To: 43001

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))





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#43001: 27.1; bad fontification of Common Lisp uninterned symbols
  2020-08-23 20:08 bug#43001: 27.1; bad fontification of Common Lisp uninterned symbols Robert Brown
@ 2020-08-24 12:35 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-24 12:35 UTC (permalink / raw)
  To: Robert Brown; +Cc: 43001

Robert Brown <robert.brown@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-24 12:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-23 20:08 bug#43001: 27.1; bad fontification of Common Lisp uninterned symbols Robert Brown
2020-08-24 12:35 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.