Skip to content

Commit 587f609

Browse files
committed
Fix for character literals
When inside a vector or before white space, the escaped characters weren't being formatted.
1 parent 8dc1b1a commit 587f609

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

clojure-mode.el

+7-8
Original file line numberDiff line numberDiff line change
@@ -862,14 +862,13 @@ any number of matches of `clojure--sym-forbidden-rest-chars'."))
862862
"\\>")
863863
0 font-lock-constant-face)
864864
;; Character literals - \1, \a, \newline, \u0000
865-
(,(rx "\\" (or any
866-
"newline" "space" "tab" "formfeed" "backspace"
867-
"return"
868-
(: "u" (= 4 (char "0-9a-fA-F")))
869-
(: "o" (repeat 1 3 (char "0-7"))))
870-
word-boundary)
871-
0 'clojure-character-face)
872-
865+
(,(rx (group "\\" (or any
866+
"newline" "space" "tab" "formfeed" "backspace"
867+
"return"
868+
(: "u" (= 4 (char "0-9a-fA-F")))
869+
(: "o" (repeat 1 3 (char "0-7")))))
870+
(or (not word) word-boundary))
871+
1 'clojure-character-face)
873872
;; namespace definitions: (ns foo.bar)
874873
(,(concat "(\\<ns\\>[ \r\n\t]*"
875874
;; Possibly metadata, shorthand and/or longhand

0 commit comments

Comments
 (0)