Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cd6b6fb

Browse files
committedApr 5, 2019
Avoid waiting for cljr-slash when typing out a reader literal.
1 parent f5f44fd commit cd6b6fb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎clj-refactor.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1956,6 +1956,11 @@ the alias in the project."
19561956
(cljr--goto-closest-ns)
19571957
(looking-at-p "(\\s-*in-ns")))
19581958

1959+
(defun cljr--in-reader-literal-p ()
1960+
(save-excursion
1961+
(clojure-backward-logical-sexp 1)
1962+
(looking-at-p "#")))
1963+
19591964
;;;###autoload
19601965
(defun cljr-slash ()
19611966
"Inserts / as normal, but also checks for common namespace shorthands to require.
@@ -1966,7 +1971,8 @@ form."
19661971
(interactive)
19671972
(insert "/")
19681973
(unless (or (cljr--in-map-destructuring?)
1969-
(cljr--in-ns-above-point-p))
1974+
(cljr--in-ns-above-point-p)
1975+
(cljr--in-reader-literal-p))
19701976
(when-let (aliases (and cljr-magic-requires
19711977
(not (cider-in-comment-p))
19721978
(not (cider-in-string-p))

2 commit comments

Comments
 (2)

magnars commented on Apr 5, 2019

@magnars
ContributorAuthor

This build fails because of a bad deployment of Hydra to Melpa. abo-abo/hydra#323 - hoping for a speedy fix there. If not, we'll have to declare a dependency on the 'lv' package.

magnars commented on Apr 5, 2019

@magnars
ContributorAuthor

The build is now passing after Hydra was fixed.

Please sign in to comment.