@@ -443,8 +443,8 @@ listed in `clojure-omit-space-between-tag-and-delimiters', this
443
443
function returns t.
444
444
445
445
This allows you to write things like #db/id[:db.part/user]
446
- without inserting a space between the tag and the opening
447
- bracket.
446
+ and #::my-ns{:some \" map \" } without inserting a space between
447
+ the tag and the opening bracket.
448
448
449
449
See `paredit-space-for-delimiter-predicates' for the meaning of
450
450
ENDP and DELIMITER."
@@ -454,7 +454,7 @@ ENDP and DELIMITER."
454
454
(save-excursion
455
455
(let ((orig-point (point )))
456
456
(not (and (re-search-backward
457
- " # \\ ([a-zA-Z0-9._-]+/ \\ )?[a-zA-Z0-9._-]+ "
457
+ clojure--collection-tag-regexp
458
458
(line-beginning-position )
459
459
t )
460
460
(= orig-point (match-end 0 )))))))))
@@ -521,7 +521,8 @@ replacement for `cljr-expand-let`."
521
521
(setq-local clojure-expected-ns-function #'clojure-expected-ns )
522
522
(setq-local parse-sexp-ignore-comments t )
523
523
(setq-local prettify-symbols-alist clojure--prettify-symbols-alist)
524
- (setq-local open-paren-in-column-0-is-defun-start nil ))
524
+ (setq-local open-paren-in-column-0-is-defun-start nil )
525
+ )
525
526
526
527
(defsubst clojure-in-docstring-p ()
527
528
" Check whether point is in a docstring."
@@ -733,7 +734,9 @@ definition of 'macros': URL `http://git.io/vRGLD'.")
733
734
(concat " [^" clojure--sym-forbidden-1st-chars " ][^" clojure--sym-forbidden-rest-chars " ]*" )
734
735
" A regexp matching a Clojure symbol or namespace alias.
735
736
Matches the rule `clojure--sym-forbidden-1st-chars' followed by
736
- any number of matches of `clojure--sym-forbidden-rest-chars' ." ))
737
+ any number of matches of `clojure--sym-forbidden-rest-chars' ." )
738
+ (defconst clojure--collection-tag-regexp " #\\ (::[a-zA-Z0-9._-]*\\ |:?\\ ([a-zA-Z0-9._-]+/\\ )?[a-zA-Z0-9._-]+\\ )"
739
+ " Allowed strings that can come before a collection literal (e.g. '[]' or '{}'), as reader macro tags. This includes #fully.qualified/my-ns[:kw val] and #::my-ns{:kw val} as of Clojure 1.9." ))
737
740
738
741
(defconst clojure-font-lock-keywords
739
742
(eval-when-compile
0 commit comments