clojure-emacs / clojure-emacs/clojure-mode
Symbols with ' in them are not font-locked correctly
- Lingua principale
- Emacs Lisp
- Stelle
- 1k
- Fork
- 249
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Cerca clojure--sym-forbidden-rest-chars nella codebase e riproduci il problema in clojure-mode con (defn test'fn []). Verifica come font-locking analizza il simbolo e conferma che l'intera forma test'fn riceva un solo colore quando il bug viene corretto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- clojure, emacs-lisp
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100