mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-03-12 09:40:59 -07:00
refactor: s/when-let/when-let*/
The former is deprecated on Emacs 31 for the latter.
This commit is contained in:
parent
0b1de48daa
commit
4fe1cbeddb
70 changed files with 210 additions and 210 deletions
|
|
@ -11,7 +11,7 @@ can use a remote conda environment, including the corresponding remote python
|
|||
executable and packages."
|
||||
(interactive)
|
||||
(require 'conda)
|
||||
(when-let (home (read-directory-name "Set conda home: " "~" nil nil conda-anaconda-home))
|
||||
(when-let* ((home (read-directory-name "Set conda home: " "~" nil nil conda-anaconda-home)))
|
||||
(setq conda-anaconda-home home)
|
||||
(message "Successfully changed conda home to: %s" (abbreviate-file-name home))))
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
;;;###autoload
|
||||
(defun +python-pyenv-read-version-from-file ()
|
||||
"Read pyenv version from .python-version file."
|
||||
(when-let (root-path (projectile-locate-dominating-file default-directory ".python-version"))
|
||||
(when-let* ((root-path (projectile-locate-dominating-file default-directory ".python-version")))
|
||||
(let* ((file-path (expand-file-name ".python-version" root-path))
|
||||
(version
|
||||
(with-temp-buffer
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ falling back on searching your PATH."
|
|||
(let ((bin (expand-file-name (concat conda-env-current-name "/" exe-root)
|
||||
(conda-env-default-location))))
|
||||
(if (file-executable-p bin) bin))))
|
||||
((when-let (bin (projectile-locate-dominating-file default-directory exe-root))
|
||||
((when-let* ((bin (projectile-locate-dominating-file default-directory exe-root)))
|
||||
(setq-local doom-modeline-python-executable (expand-file-name exe-root bin))))
|
||||
((executable-find exe))))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue