clojure-emacs / clojure-emacs/clojure-mode

Symbols with ' in them are not font-locked correctly

Open
#435 7 comments 1 reaction 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
1k
Forks
249
PR merge metrics
No merged PRs in 30d

Description

A symbol with ' in it should be font-locked so that the whole symbol has the same color. I'm no expert on font-locking, nor on clojure-mode, but I quickly browsed the code, and this seems wrong:
``` (defconst clojure--sym-forbidden-rest-chars "][\";\'@\\^`~\(\)\{\}\\,\s\t\n\r"```
since https://clojure.org/reference/reader says that `'` is allowed in a symbol. I tried to change that but it didn't solve the problem below.

## Steps to reproduce the problem

Type `(defn test'fn [])` in clojure-mode and note the colors.

## Expected behavior

All characters of `test'fn` should be of the same color.

## Actual behavior

The characters after and including `'` are not of the expected color (they are white, my default text color).

## clojure-mode version information

5.7.0-snapshot

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.