clojure-emacs / clojure-emacs/clojure-mode

Symbols with ' in them are not font-locked correctly

Abierto
#435 7 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
Emacs Lisp
Estrellas
1k
Forks
249
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Busca en el código base clojure--sym-forbidden-rest-chars y reproduce el problema en clojure-mode con (defn test'fn []). Verifica cómo font-locking analiza el símbolo y confirma que la forma completa test'fn recibe un solo color cuando se corrige el error.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
clojure, emacs-lisp
Área
tooling
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.