Skip to content

Commit 12ab3d0

Browse files
committed
fix (def* symbols to lock to keyword-face.
1 parent 3760bc0 commit 12ab3d0

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

clojure-mode.el

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,18 @@ elements of a def* forms."
349349
;; Possibly type or metadata
350350
"\\(?:#?^\\(?:{[^}]*}\\|\\sw+\\)[ \r\n\t]*\\)*"
351351
"\\(\\sw+\\)?")
352-
(1 font-lock-type-face)
352+
(1 font-lock-keyword-face)
353+
(2 font-lock-function-name-face nil t))
354+
;; (fn name? args ...)
355+
(,(concat "(\\(?:clojure.core/\\)?\\(fn\\)[ \t]+"
356+
;; Possibly type
357+
"\\(?:#?^\\sw+[ \t]*\\)?"
358+
;; Possibly name
359+
"\\(t\\sw+\\)?" )
360+
(1 font-lock-keyword-face)
353361
(2 font-lock-function-name-face nil t))
354-
(,(concat "\\(\\(?:[a-z\.-]+/\\)?def\[a-z\]*-?\\)"
362+
363+
(,(concat "(\\(\\(?:[a-z\.-]+/\\)?def\[a-z\]*-?\\)"
355364
;; Function declarations.
356365
"\\>"
357366
;; Any whitespace
@@ -495,14 +504,6 @@ elements of a def* forms."
495504
) t)
496505
"\\>")
497506
1 font-lock-variable-name-face)
498-
;; (fn name? args ...)
499-
(,(concat "(\\(?:clojure.core/\\)?\\(fn\\)[ \t]+"
500-
;; Possibly type
501-
"\\(?:#?^\\sw+[ \t]*\\)?"
502-
;; Possibly name
503-
"\\(\\sw+\\)?" )
504-
(1 font-lock-keyword-face)
505-
(2 font-lock-function-name-face nil t))
506507
;;Other namespaces in clojure.jar
507508
(,(concat
508509
"(\\(?:\.*/\\)?"

0 commit comments

Comments
 (0)