Symbols with ' in them are not font-locked correctly

Aperta
#435 7 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
clojure, emacs-lisp
Ambito
tooling

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.

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

Lingua principale
Emacs Lisp
Stelle
1k
Fork
249
Merge medio
1g 6h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di clojure-emacs/clojure-mode

Tutte le issue di clojure-emacs/clojure-mode

Issue simili

Altre issue su DevTools

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.