Skip to content

Commit ef4f673

Browse files
author
Vadim Rodionov
committed
Make 'defn' regexp strict
1 parent 68e0e13 commit ef4f673

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

clojure-mode.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -878,10 +878,9 @@ any number of matches of `clojure--sym-forbidden-rest-chars'."))
878878
"\\(?:#?^\\(?:{[^}]*}\\|\\sw+\\)[ \r\n\t]*\\)*"
879879
"\\(\\sw+\\)?")
880880
(2 font-lock-type-face nil t))
881-
;; Function definition (anything that starts with def and is not
882-
;; listed above)
881+
;; Function definition
883882
(,(concat "(\\(?:" clojure--sym-regexp "/\\)?"
884-
"\\(def[^ \r\n\t]*\\)"
883+
"\\(defn\\)"
885884
;; Function declarations
886885
"\\>"
887886
;; Any whitespace

test/clojure-mode-font-lock-test.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ DESCRIPTION is the description of the spec."
786786
(2 4 font-lock-type-face)
787787
(5 5 nil)
788788
(6 14 font-lock-keyword-face)
789-
(16 18 font-lock-function-name-face))
789+
(16 18 nil))
790790

791791
("(s/def ::keyword)"
792792
(2 2 font-lock-type-face)

0 commit comments

Comments
 (0)