File tree 2 files changed +19
-2
lines changed
2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -2110,7 +2110,7 @@ content) are considered part of the preceding sexp."
2110
2110
(make-obsolete-variable 'clojure-namespace-name-regex 'clojure-namespace-regexp " 5.12.0" )
2111
2111
2112
2112
(defconst clojure-namespace-regexp
2113
- (rx line-start " (" (? " clojure.core/" ) (or " in-ns" " ns" " ns+" ) symbol-end))
2113
+ (rx " (" (? " clojure.core/" ) (or " in-ns" " ns" " ns+" ) symbol-end))
2114
2114
2115
2115
(defcustom clojure-cache-ns nil
2116
2116
" Whether to cache the results of `clojure-find-ns' .
Original file line number Diff line number Diff line change 125
125
(with-clojure-buffer " (ns foo)
126
126
(ns-unmap *ns* 'map)
127
127
(ns.misleading 1 2 3)"
128
+ (expect (clojure-find-ns) :to-equal " foo" )))
129
+ (it " should skip leading garbage"
130
+ (with-clojure-buffer " (ns foo)"
131
+ (expect (clojure-find-ns) :to-equal " foo" ))
132
+ (with-clojure-buffer " 1(ns foo)"
133
+ (expect (clojure-find-ns) :to-equal " foo" ))
134
+ (with-clojure-buffer " 1 (ns foo)"
135
+ (expect (clojure-find-ns) :to-equal " foo" ))
136
+ (with-clojure-buffer " 1
137
+ (ns foo)"
138
+ (expect (clojure-find-ns) :to-equal " foo" ))
139
+ (with-clojure-buffer " [1]
140
+ (ns foo)"
141
+ (expect (clojure-find-ns) :to-equal " foo" ))
142
+ (with-clojure-buffer " [1] (ns foo)"
143
+ (expect (clojure-find-ns) :to-equal " foo" ))
144
+ (with-clojure-buffer " [1](ns foo)"
128
145
(expect (clojure-find-ns) :to-equal " foo" ))))
129
146
130
147
(describe " clojure-sort-ns"
154
171
;;[comment2]
155
172
))" )))
156
173
(it " should sort requires in ns with copyright disclamer and comments"
157
- (with-clojure-buffer " ;; Copyright (c) John Doe. All rights reserved.
174
+ (with-clojure-buffer " ;; Copyright (c) John Doe. All rights reserved.
158
175
;; The use and distribution terms for this software are covered by the
159
176
;; Eclipse Public License 1.0 (https://opensource.org/license/epl-1-0/)
160
177
(ns clojure.core
You can’t perform that action at this time.
0 commit comments