Skip to content

Commit 99aed44

Browse files
author
Bozhidar Batsov
committed
Separate special forms from clojure.core forms
1 parent 8583c0f commit 99aed44

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

clojure-mode.el

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -439,24 +439,29 @@ Called by `imenu--generic-function'."
439439
(2 font-lock-function-name-face nil t))
440440
;; lambda arguments - %, %1, %2, etc
441441
("\\<%[1-9]?" (0 font-lock-variable-name-face))
442-
;; Special forms & control structures
442+
;; Special forms
443+
(,(concat
444+
"("
445+
(regexp-opt
446+
'("def" "do" "if" "let" "var" "fn" "loop"
447+
"recur" "throw" "try" "catch" "finally"
448+
"set!" "new" "."
449+
"monitor-enter" "monitor-exit" "quote") t)
450+
"\\>")
451+
1 font-lock-keyword-face)
452+
;; Built-in binding and flow of control forms
443453
(,(concat
444454
"(\\(?:clojure.core/\\)?"
445455
(regexp-opt
446-
'("let" "letfn" "do"
447-
"case" "cond" "cond->" "cond->>" "condp"
448-
"for" "loop" "recur"
449-
"when" "when-not" "when-let" "when-first" "when-some"
450-
"if" "if-let" "if-not" "if-some"
451-
"." ".." "->" "->>" "doto"
452-
"and" "or"
456+
'("letfn" "case" "cond" "cond->" "cond->>" "condp"
457+
"for" "when" "when-not" "when-let" "when-first" "when-some"
458+
"if-let" "if-not" "if-some"
459+
".." "->" "->>" "doto" "and" "or"
453460
"dosync" "doseq" "dotimes" "dorun" "doall"
454461
"load" "import" "unimport" "ns" "in-ns" "refer"
455-
"try" "catch" "finally" "throw"
456462
"with-open" "with-local-vars" "binding"
457463
"gen-class" "gen-and-load-class" "gen-and-save-class"
458-
"handler-case" "handle" "var" "declare" "set!" "new"
459-
"monitor-enter" "monitor-exit" "quote") t)
464+
"handler-case" "handle" "declare") t)
460465
"\\>")
461466
1 font-lock-keyword-face)
462467
(,(concat

0 commit comments

Comments
 (0)