@@ -353,19 +353,19 @@ Called by `imenu--generic-function'."
353
353
(goto-char start)))))
354
354
355
355
(eval-and-compile
356
- (defconst clojure-sym-rest-chars " ^ ][\" ;\' @\\ ^`~\(\)\{\} \\ "
356
+ (defconst clojure-- sym-forbidden- rest-chars " ][\" ;\' @\\ ^`~\(\)\{\} \\ "
357
357
" A list of chars that a Clojure symbol cannot contain.
358
358
See definiton of 'macros': URL `http://git.io/vRGLD' ." )
359
- (defconst clojure-sym-1st-chars (concat clojure-sym-rest-chars " 0-9" )
359
+ (defconst clojure-- sym-forbidden- 1st-chars (concat clojure-- sym-forbidden -rest-chars " 0-9" )
360
360
" A list of chars that a Clojure symbol cannot start with.
361
361
See the for-loop: URL `http://git.io/vRGTj' lines: URL
362
362
`http://git.io/vRGIh' , URL `http://git.io/vRGLE' and value
363
363
definition of 'macros': URL `http://git.io/vRGLD' ." )
364
- (defconst clojure-sym
365
- (concat " [" clojure-sym-1st-chars " ][" clojure-sym-rest-chars " ]+" )
364
+ (defconst clojure-- sym-regexp
365
+ (concat " [^ " clojure-- sym-forbidden- 1st-chars " ][^ " clojure-- sym-forbidden -rest-chars " ]+" )
366
366
" A regexp matching a Clojure symbol or namespace alias.
367
- Matches the rule `clojure-sym-1st-chars' followed by any number
368
- of matches of `clojure-sym-rest-chars' ." ))
367
+ Matches the rule `clojure-- sym-forbidden- 1st-chars' followed by
368
+ any number of matches of `clojure-- sym-forbidden -rest-chars' ." ))
369
369
370
370
(defconst clojure-font-lock-keywords
371
371
(eval-when-compile
@@ -396,7 +396,7 @@ of matches of `clojure-sym-rest-chars'."))
396
396
(2 font-lock-type-face nil t ))
397
397
; ; Function definition (anything that starts with def and is not
398
398
; ; listed above)
399
- (,(concat " (\\ (?:" clojure-sym " /\\ )?"
399
+ (,(concat " (\\ (?:" clojure-- sym-regexp " /\\ )?"
400
400
" \\ (def[^ \r\n\t ]*\\ )"
401
401
; ; Function declarations
402
402
" \\ >"
@@ -477,7 +477,7 @@ of matches of `clojure-sym-rest-chars'."))
477
477
; ; Character literals - \1, \a, \newline, \u0000
478
478
(" \\\\\\ ([[:punct:]]\\ |[a-z0-9]+\\ >\\ )" 0 'clojure-character-face )
479
479
; ; foo/ Foo/ @Foo/ /FooBar
480
- (,(concat " \\ (?:\\ <:?\\ |\\ .\\ )@?\\ (" clojure-sym " \\ )\\ (/\\ )" )
480
+ (,(concat " \\ (?:\\ <:?\\ |\\ .\\ )@?\\ (" clojure-- sym-regexp " \\ )\\ (/\\ )" )
481
481
(1 font-lock-type-face ) (2 'default ))
482
482
; ; Constant values (keywords), including as metadata e.g. ^:static
483
483
(" \\ <^?\\ (:\\ (\\ sw\\ |\\ s_\\ )+\\ (\\ >\\ |\\ _>\\ )\\ )" 1 'clojure-keyword-face append )
0 commit comments