clojure-emacs / clojure-emacs/clojure-mode
Symbols with ' in them are not font-locked correctly
- 主要言語
- Emacs Lisp
- スター
- 1k
- フォーク
- 249
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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
コントリビューションガイド
調査の方向性
コードベースで clojure--sym-forbidden-rest-chars を検索し、(defn test'fn []) を使って clojure-mode で問題を再現します。font-locking がシンボルをどのように解析するかを確認し、バグが修正されたときに完全な test'fn フォームが 1 色で表示されることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- clojure, emacs-lisp
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100