Skip to content

Commit 81245cf

Browse files
committed
completable-for-cljr-slash?: also complete @
1 parent de63411 commit 81245cf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

clj-refactor.el

+5-1
Original file line numberDiff line numberDiff line change
@@ -1989,7 +1989,11 @@ the alias in the project."
19891989

19901990
(defun completable-for-cljr-slash? (sym)
19911991
(when sym
1992-
(not (null (string-match-p "^\\^?\\(::\\)?\\([a-zA-Z]+[a-zA-Z0-9\\-]*\\)+\\(\\.?[a-zA-Z]+[a-zA-Z0-9\\-]*\\)*$" sym)))))
1992+
(or
1993+
;; vanilla symbols, maybe prefixed by ^, :: or ^::
1994+
(not (null (string-match-p "^\\^?\\(::\\)?\\([a-zA-Z]+[a-zA-Z0-9\\-]*\\)+\\(\\.?[a-zA-Z]+[a-zA-Z0-9\\-]*\\)*$" sym)))
1995+
;; vanilla symbols, prefixed by @
1996+
(not (null (string-match-p "^@\\([a-zA-Z]+[a-zA-Z0-9\\-]*\\)+\\(\\.?[a-zA-Z]+[a-zA-Z0-9\\-]*\\)*$" sym))))))
19931997

19941998
;;;###autoload
19951999
(defun cljr-slash ()

tests/unit-test.el

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
(dolist (prefix '(""
88
"::"
99
"^"
10-
"^::"))
10+
"^::"
11+
"@"))
1112
(expect (completable-for-cljr-slash? (concat prefix "a")) :to-be t)
1213
(expect (completable-for-cljr-slash? (concat prefix "a-")) :to-be t)
1314
(expect (completable-for-cljr-slash? (concat prefix "a2")) :to-be t)

0 commit comments

Comments
 (0)