clojure-emacs / clojure-emacs/clojure-mode

Symbols with ' in them are not font-locked correctly

Offen
#435 7 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Emacs Lisp
Sterne
1k
Forks
249
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Durchsuchen Sie die Codebasis nach clojure--sym-forbidden-rest-chars und reproduzieren Sie das Problem in clojure-mode mit (defn test'fn []). Überprüfen Sie, wie font-locking das Symbol analysiert, und bestätigen Sie, dass die vollständige test'fn-Form eine Farbe erhält, wenn der Fehler behoben ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
clojure, emacs-lisp
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.