Symbols with ' in them are not font-locked correctly

Offen
#435 7 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

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

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.

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

Vorherrschende Sprache
Emacs Lisp
Sterne
1k
Forks
249
Ø Merge
1 T. 6 Std.
Gemergte PRs (30 T.)
6

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus clojure-emacs/clojure-mode

Alle Issues in clojure-emacs/clojure-mode

Ähnliche Issues

Weitere Issues zu DevTools

Neue Issues direkt in Ihr Postfach

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