File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -2702,7 +2702,7 @@ lists up."
27022702(defun clojure--rename-ns-alias-internal (current-alias new-alias )
27032703 " Rename a namespace alias CURRENT-ALIAS to NEW-ALIAS."
27042704 (clojure--find-ns-in-direction 'backward )
2705- (let ((rgx (concat " :as +" (regexp-quote current-alias)))
2705+ (let ((rgx (concat " :as +" (regexp-quote current-alias) " \\ _> " ))
27062706 (bound (save-excursion (forward-list 1 ) (point ))))
27072707 (when (search-forward-regexp rgx bound t )
27082708 (replace-match (concat " :as " new-alias))
@@ -2767,7 +2767,7 @@ With a numeric prefix argument the let is introduced N lists up."
27672767 (let* ((current-alias (completing-read " Current alias: "
27682768 (clojure-collect-ns-aliases
27692769 (thing-at-point 'list ))))
2770- (rgx (concat " :as +" current-alias))
2770+ (rgx (concat " :as +" ( regexp-quote current-alias) " \\ _> " ))
27712771 (bound (save-excursion (forward-list 1 ) (point ))))
27722772 (if (save-excursion (search-forward-regexp rgx bound t ))
27732773 (let ((new-alias (read-from-minibuffer " New alias: " )))
Original file line number Diff line number Diff line change 4343 (+ (foo/a 1) (b 2))"
4444
4545 (clojure--rename-ns-alias-internal " lib" " foo" ))
46+ (when-refactoring-it " should handle multiple aliases with common prefixes"
47+
48+ " (ns foo
49+ (:require [clojure.string :as string]
50+ [clojure.spec.alpha :as s]
51+ [clojure.java.shell :as shell]))
52+
53+ (s/def ::abc string/blank?)
54+ "
55+ " (ns foo
56+ (:require [clojure.string :as string]
57+ [clojure.spec.alpha :as spec]
58+ [clojure.java.shell :as shell]))
59+
60+ (spec/def ::abc string/blank?)
61+ "
62+ (clojure--rename-ns-alias-internal " s" " spec" ))
4663
4764 (when-refactoring-it " should handle ns declarations with missing as"
4865 " (ns cljr.core
You can’t perform that action at this time.
0 commit comments