You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Symbols with colons in the middle (like a:b) get separate font faces before and after the colon.
Expected behavior
Symbols or bindings with a single colon : not at beginning or end should be recognized as a single symbol unit for the purpose of syntax highlighting. Specifically, it seems they should get font-lock-variable-name-face.
Symbols beginning or ending with ':' are reserved by Clojure. A symbol can contain one or more non-repeating ':'s.
Actual behavior
A symbol with a colon (not at beginning or end) in the name-defining position gets the correct font-face (apparently font-lock-variable-name-face), but other instances get default for the pre-colon portion and clojure-keyword-face thereafter.
This makes every usage of the symbol or binding to get styled like a half-keyword, half-symbol.
However, jumping to a clojure font-face definition gives me clojure-mode-20230626.715. (The clojure-mode invocation was broken in my previous spring 2022 version, too. I installed with package-list-packages from melpa.)
Emacs version
GNU Emacs 28.2 (build 1, aarch64-apple-darwin22.1.0, Carbon Version 169 AppKit 2299) of 2022-12-10
Operating system
macOS Ventura 13.4
The text was updated successfully, but these errors were encountered:
Changes syntax highlighting regexp for keywords to match a colon/double-colon
only at the beginning of a word, not in the middle. This allows local vars like
`foo:bar` to be highlighted correctly instead of like an unknown symbol for the
part before the colon and a keyword for the rest.
Fixesclojure-emacs#653
Changes syntax highlighting regexp for keywords to match a colon/double-colon
only at the beginning of a word, not in the middle. This allows local vars like
`foo:bar` to be highlighted correctly instead of like an unknown symbol for the
part before the colon and a keyword for the rest.
Fixes#653
Symbols with colons in the middle (like
a:b
) get separate font faces before and after the colon.Expected behavior
Symbols or bindings with a single colon
:
not at beginning or end should be recognized as a single symbol unit for the purpose of syntax highlighting. Specifically, it seems they should getfont-lock-variable-name-face
.Per the Clojure reader reference docs for symbols:
Actual behavior
A symbol with a colon (not at beginning or end) in the name-defining position gets the correct font-face (apparently
font-lock-variable-name-face
), but other instances getdefault
for the pre-colon portion andclojure-keyword-face
thereafter.This makes every usage of the symbol or binding to get styled like a half-keyword, half-symbol.
Steps to reproduce the problem
Environment & Version information
clojure-mode version
However, jumping to a clojure font-face definition gives me
clojure-mode-20230626.715
. (The clojure-mode invocation was broken in my previous spring 2022 version, too. I installed with package-list-packages from melpa.)Emacs version
Operating system
macOS Ventura 13.4
The text was updated successfully, but these errors were encountered: