@@ -352,6 +352,13 @@ Called by `imenu--generic-function'."
352352 (set-match-data (list def-beg def-end)))))
353353 (goto-char start)))))
354354
355+ (eval-when-compile
356+ ; ; See clojure.lang.LispReader definition and getMacro invocation(s)
357+ (defconst clojure-sym-rest-chars " ^][\" ;\' @\\ ^`~\(\)\{\} \\ " )
358+ (defconst clojure-sym-1st-chars (concat clojure-sym-rest-chars " 0-9" ))
359+ (defconst clojure-sym
360+ (concat " [" clojure-sym-1st-chars " ][" clojure-sym-rest-chars " ]+" )))
361+
355362(defconst clojure-font-lock-keywords
356363 (eval-when-compile
357364 `(; ; Top-level variable definition
@@ -381,7 +388,8 @@ Called by `imenu--generic-function'."
381388 (2 font-lock-type-face nil t ))
382389 ; ; Function definition (anything that starts with def and is not
383390 ; ; listed above)
384- (,(concat " (\\ (?:[a-z\. -]+/\\ )?\\ (def[^ \r\n\t ]*\\ )"
391+ (,(concat " (\\ (?:" clojure-sym " /\\ )?"
392+ " \\ (def[^ \r\n\t ]*\\ )"
385393 ; ; Function declarations
386394 " \\ >"
387395 ; ; Any whitespace
@@ -461,7 +469,8 @@ Called by `imenu--generic-function'."
461469 ; ; Character literals - \1, \a, \newline, \u0000
462470 (" \\\\\\ ([[:punct:]]\\ |[a-z0-9]+\\ >\\ )" 0 'clojure-character-face )
463471 ; ; foo/ Foo/ @Foo/ /FooBar
464- (" \\ (?:\\ <:?\\ |\\ .\\ )@?\\ ([a-zA-Z][.a-zA-Z0-9$_-]*\\ )\\ (/\\ )" (1 font-lock-type-face ) (2 'default ))
472+ (,(concat " \\ (?:\\ <:?\\ |\\ .\\ )@?\\ (" clojure-sym " \\ )\\ (/\\ )" )
473+ (1 font-lock-type-face ) (2 'default ))
465474 ; ; Constant values (keywords), including as metadata e.g. ^:static
466475 (" \\ <^?\\ (:\\ (\\ sw\\ |\\ s_\\ )+\\ (\\ >\\ |\\ _>\\ )\\ )" 1 'clojure-keyword-face append )
467476 ; ; Java interop highlighting
0 commit comments