Skip to content

Commit bc485f7

Browse files
yuhan0bbatsov
authored andcommitted
Disable cljr-slash for fractions
1 parent 657a169 commit bc485f7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clj-refactor.el

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,6 +1968,11 @@ the alias in the project."
19681968
(clojure-backward-logical-sexp 1)
19691969
(looking-at-p "#")))
19701970

1971+
(defun cljr--in-number-p ()
1972+
(save-excursion
1973+
(backward-sexp 1)
1974+
(looking-at-p "[-+0-9]")))
1975+
19711976
;;;###autoload
19721977
(defun cljr-slash ()
19731978
"Inserts / as normal, but also checks for common namespace shorthands to require.
@@ -1984,6 +1989,7 @@ form."
19841989
(not (cider-in-comment-p))
19851990
(not (cider-in-string-p))
19861991
(not (cljr--in-keyword-sans-alias-p))
1992+
(not (cljr--in-number-p))
19871993
(clojure-find-ns)
19881994
(cljr--magic-requires-lookup-alias)))
19891995
(let ((short (cl-first aliases)))

0 commit comments

Comments
 (0)