-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve integration with Clojure 1.11's new
:as-alias
namespace dir…
…ective Fixes https://github.com/clojure-emacs/clj-refactor.el/issues/515 Fixes #516
- Loading branch information
Showing
3 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
;; Lars Andersen <[email protected]> | ||
;; Benedek Fazekas <[email protected]> | ||
;; Bozhidar Batsov <[email protected]> | ||
;; Version: 3.4.3 | ||
;; Version: 3.5.0 | ||
;; Keywords: convenience, clojure, cider | ||
|
||
;; Package-Requires: ((emacs "26.1") (seq "2.19") (yasnippet "0.6.1") (paredit "24") (multiple-cursors "1.2.2") (clojure-mode "5.14") (cider "1.3") (parseedn "1.0.6") (inflections "2.3") (hydra "0.13.2")) | ||
|
@@ -693,7 +693,7 @@ refactor-nrepl.util will be returned." | |
(save-excursion | ||
(cljr--goto-ns) | ||
(when (re-search-forward | ||
(format ":as\\s-*\n*\\s-*%s\\_>" (regexp-quote alias)) | ||
(format ":as\\(-alias\\)?\\s-*\n*\\s-*%s\\_>" (regexp-quote alias)) | ||
(cljr--point-after 'paredit-forward) | ||
:noerror) | ||
(paredit-backward-up) | ||
|
@@ -2039,6 +2039,7 @@ will add the corresponding require statement to the ns form." | |
(candidates (mapcar 'identity (cl-second aliases)))) | ||
(when-let (long (cljr--prompt-user-for "Require " candidates)) | ||
(when (and (not (cljr--in-namespace-declaration-p (concat ":as " short "\b"))) | ||
(not (cljr--in-namespace-declaration-p (concat ":as-alias " short "\b"))) | ||
(or (not (eq :prompt cljr-magic-requires)) | ||
(not (> (length candidates) 1)) ; already prompted | ||
(yes-or-no-p (format "Add %s :as %s to requires?" long short)))) | ||
|
@@ -3294,7 +3295,7 @@ if REMOVE-PACKAGE_VERSION is t get rid of the (package: 20150828.1048) suffix." | |
;; We used to derive the version out of `(cljr--version t)`, | ||
;; but now prefer a fixed version to fully decouple things and prevent unforeseen behavior. | ||
;; This suits better our current pace of development. | ||
(defcustom cljr-injected-middleware-version "3.4.2" | ||
(defcustom cljr-injected-middleware-version "3.5.0" | ||
"The refactor-nrepl version to be injected. | ||
You can customize this in order to try out new releases. | ||
|