clojure-emacs / clojure-emacs/clojure-mode
Symbols with ' in them are not font-locked correctly
- Langage dominant
- Emacs Lisp
- Étoiles
- 999
- Forks
- 249
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Recherchez clojure--sym-forbidden-rest-chars dans la base de code et reproduisez le problème dans clojure-mode avec (defn test'fn []). Vérifiez comment font-locking analyse le symbole et confirmez que la forme complète test'fn reçoit une seule couleur lorsque le bug est corrigé.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- clojure, emacs-lisp
- Domaine
- tooling
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100