clojure-emacs / clojure-mode

Emacs support for the Clojure(Script) programming language
910 stars 246 forks source link

Incorrect syntax highlighting for test name defined with `deftest` #633

Closed rrudakov closed 2 years ago

rrudakov commented 2 years ago

Expected behavior

Test name highlighted with proper face (probably font-lock-function-name-face). I guess it can be related to https://github.com/clojure-emacs/clojure-mode/pull/630

Actual behavior

Test name highlighted with default face.

Screenshot 2022-09-05 at 11 16 04

Steps to reproduce the problem

Environment & Version information

clojure-mode version

clojure-mode (version nil) ;; I guess this is another issue with the package

MELPA package version: clojure-mode 20220903.932

Emacs version

GNU Emacs 29.0.50 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.5.1 (Build 21G83)) of 2022-08-26

Operating system

MacOS

bbatsov commented 2 years ago

@OknoLombarda can you take a look at this?

rrudakov commented 2 years ago

I've just noticed that it's also applicable to defmulti and defmethod:

image
OknoLombarda commented 2 years ago

Well, it's expected. Only defn now has special highlighting. I'll add defn-, defmulti, defmethod, deftest and deftest- to the list. I think that's all the definitions which define functions? Or should defmacro and definline be highlighted as function definitions, too?

bbatsov commented 2 years ago

We can have all of them with the same font-locking for now. I think that's how most Lisp major modes do it as.