diff options
author | Tianxiang Xiong <tianxiang.xiong@gmail.com> | 2017-12-11 01:17:50 -0800 |
---|---|---|
committer | Bozhidar Batsov <bozhidar.batsov@gmail.com> | 2017-12-11 16:09:54 +0000 |
commit | b34057a1944354cbd2100e2beb08d6c6e1e06da3 (patch) | |
tree | a033bdacf950d04623b1f78824c171ee7dceab07 /cider-resolve.el | |
parent | b484daa718c09c3d41e260878f93a35f05edb5b4 (diff) |
Replace `if-let` and `when-let` with starred versions
Fix #2130.
Emacs 26 obsoletes `if-let` and `when-let`, replacing them with `if-let*` and
`when-let*`. This raises byte-compilation warnings (treated as errors) when
testing against Emacs 26.
See: http://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-26#n1278
Diffstat (limited to 'cider-resolve.el')
-rw-r--r-- | cider-resolve.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cider-resolve.el b/cider-resolve.el index 6f9f8ebf..fa328aff 100644 --- a/cider-resolve.el +++ b/cider-resolve.el @@ -95,7 +95,7 @@ Return nil only if VAR cannot be resolved." (cider-resolve--get-in (or var-ns ns) "interns" name) (unless var-ns ;; If the var had no prefix, it might be referred. - (if-let ((referal (cider-resolve--get-in ns "refers" name))) + (if-let* ((referal (cider-resolve--get-in ns "refers" name))) (cider-resolve-var ns referal) ;; Or it might be from core. (unless (equal ns "clojure.core") @@ -114,9 +114,9 @@ This will be clojure.core or cljs.core depending on `cider-repl-type'." "Return a plist of all valid symbols in NS. Each entry's value is the metadata of the var that the symbol refers to. NS can be the namespace name, or a dict of the namespace itself." - (when-let ((dict (if (stringp ns) - (cider-resolve--get-in ns) - ns))) + (when-let* ((dict (if (stringp ns) + (cider-resolve--get-in ns) + ns))) (nrepl-dbind-response dict (interns refers aliases) (append (cdr interns) (nrepl-dict-flat-map (lambda (alias namespace) |