diff --git a/lisp/_prepare.el b/lisp/_prepare.el index d6bfb73f..55765a33 100644 --- a/lisp/_prepare.el +++ b/lisp/_prepare.el @@ -289,7 +289,7 @@ The function `directory-empty-p' only exists 28.1 or above; copied it." (defun eask--guess-package-name (basename) "Convert the BASENAME to a valid, commonly seen package name." - (when-let ((name (ignore-errors (downcase basename)))) + (when-let* ((name (ignore-errors (downcase basename)))) (setq name (eask-s-replace "emacs-" "" name) name (eask-s-replace "-emacs" "" name) name (replace-regexp-in-string "[.-]el$" "" name)) @@ -744,13 +744,13 @@ otherwise, we retrieve it from the variable `package-archive-contents'." For arguments NAME and CURRENT, please see function `eask-package-desc' for full detials." - (when-let ((desc (eask-package-desc name current))) + (when-let* ((desc (eask-package-desc name current))) (package-desc-version desc))) (defun eask-package--version-string (pkg) "Return PKG's version." - (if-let ((version (or (eask-package--version pkg t) - (eask-package--version pkg nil)))) + (if-let* ((version (or (eask-package--version pkg t) + (eask-package--version pkg nil)))) (package-version-join version) ;; Just in case, but this should never happens! "0")) @@ -758,7 +758,7 @@ full detials." (defun eask-package-desc-url () "Return url from package descriptor." (when eask-package-desc - (when-let ((extras (package-desc-extras eask-package-desc))) + (when-let* ((extras (package-desc-extras eask-package-desc))) (cdr (assoc :url extras))))) (defun eask-package-desc-keywords () @@ -1390,7 +1390,7 @@ version number. DESCRIPTION is the package description." (if (file-exists-p eask-package-file) (eask--try-construct-package-desc eask-package-file) (eask-warn "Package-file seems to be missing `%s'" file)) - (when-let + (when-let* (((and (not eask-package-descriptor) ; prevent multiple definition error (not eask-package-desc))) ; check if constructed (pkg-file (eask-pkg-el))) @@ -1584,7 +1584,7 @@ Execute forms BODY limit by the verbosity level (SYMBOL)." (defun eask--ansi (symbol string) "Paint STRING with color defined by log level (SYMBOL)." - (if-let ((ansi-function (cdr (assq symbol eask-level-color)))) + (if-let* ((ansi-function (cdr (assq symbol eask-level-color)))) (funcall ansi-function string) string)) @@ -1817,7 +1817,7 @@ Arguments FNC and ARGS are used for advice `:around'." (defun eask-package-elc-files () "Return package files' elc in workspace." - (when-let ((elcs (mapcar (lambda (elm) (concat elm "c")) (eask-package-el-files)))) + (when-let* ((elcs (mapcar (lambda (elm) (concat elm "c")) (eask-package-el-files)))) (setq elcs (cl-remove-if-not (lambda (elm) (file-exists-p elm)) elcs)) elcs)) diff --git a/lisp/clean/elc.el b/lisp/clean/elc.el index a39c84a3..cefa2475 100644 --- a/lisp/clean/elc.el +++ b/lisp/clean/elc.el @@ -15,7 +15,7 @@ nil t)) (eask-start - (if-let ((files (eask-package-elc-files))) + (if-let* ((files (eask-package-elc-files))) (progn (mapc #'eask-delete-file files) (eask-msg "") diff --git a/lisp/core/eval.el b/lisp/core/eval.el index 247b3b8d..5d4fbf51 100644 --- a/lisp/core/eval.el +++ b/lisp/core/eval.el @@ -20,7 +20,7 @@ (eask-defvc< 27 (eask-pkg-init)) ; XXX: remove this after we drop 26.x (eask-setup-paths) - (if-let ((name (eask-argv 0))) + (if-let* ((name (eask-argv 0))) (eask-with-progress (ansi-green "Exporting environment variables... ") (eask-exec-export-env) diff --git a/lisp/core/info.el b/lisp/core/info.el index 1ed624d9..a89fa3c0 100644 --- a/lisp/core/info.el +++ b/lisp/core/info.el @@ -46,7 +46,7 @@ (when-let* ((url (or (eask-package-desc-url) eask-website-url)) ((not (string-empty-p url)))) (eask-println (ansi-cyan url))) - (when-let ((keywords (or (eask-package-desc-keywords) eask-keywords))) + (when-let* ((keywords (or (eask-package-desc-keywords) eask-keywords))) (eask-println "") (eask-println "keywords: %s" (string-join keywords ", "))) (eask-println "") diff --git a/lisp/core/install.el b/lisp/core/install.el index b63ab1db..d7db5767 100644 --- a/lisp/core/install.el +++ b/lisp/core/install.el @@ -78,7 +78,7 @@ For argument FILE, please see function `package-install-file' for the details." ;; XXX: You must refresh content before you install the package, ;; see https://github.com/ericdallo/jet.el/issues/1 (eask-pkg-init) - (if-let ((names (eask-args))) + (if-let* ((names (eask-args))) ;; If package [name..] are specified, we try to install it (eask-install-packages names) ;; Else we try to install package from the working directory diff --git a/lisp/core/list.el b/lisp/core/list.el index f531a69e..354140bf 100644 --- a/lisp/core/list.el +++ b/lisp/core/list.el @@ -57,8 +57,8 @@ contents." (if (= depth 0) (eask-msg (eask-list--align depth " %-80s") name version archive summary) (eask-msg (eask-list--align depth) name "" "" "")) - (when-let ((reqs (package-desc-reqs desc)) - ((< depth max-depth))) + (when-let* ((reqs (package-desc-reqs desc)) + ((< depth max-depth))) (dolist (req reqs) (eask-list--print-pkg (car req) (1+ depth) max-depth pkg-alist))))) diff --git a/lisp/core/load.el b/lisp/core/load.el index f404ff0e..e1bfd4cf 100644 --- a/lisp/core/load.el +++ b/lisp/core/load.el @@ -20,7 +20,7 @@ nil t)) (eask-start - (if-let ((files (eask-expand-file-specs (eask-args)))) + (if-let* ((files (eask-expand-file-specs (eask-args)))) (mapc #'load-file files) (eask-info "(Nothing to load.)"))) diff --git a/lisp/core/loc.el b/lisp/core/loc.el index a547e3ce..a19455cb 100644 --- a/lisp/core/loc.el +++ b/lisp/core/loc.el @@ -41,8 +41,8 @@ (require 'markdown-mode) ;; Start LOC - (if-let ((files (or (eask-expand-file-specs (eask-args)) - (eask-package-files))) + (if-let* ((files (or (eask-expand-file-specs (eask-args)) + (eask-package-files))) (eask-output (get-buffer-create "*eask-output*"))) (with-current-buffer eask-output (erase-buffer) diff --git a/lisp/core/recipe.el b/lisp/core/recipe.el index 01f1a7c6..8ebc9263 100644 --- a/lisp/core/recipe.el +++ b/lisp/core/recipe.el @@ -16,7 +16,7 @@ (defun eask-recipe-string () "Return the recipe format in string." - (when-let ((url (eask-package-desc-url))) + (when-let* ((url (eask-package-desc-url))) (let* ((fetcher (cond ((string-match-p "github.com" url) 'github) ((string-match-p "gitlab.com" url) 'gitlab) (t 'git))) @@ -35,8 +35,8 @@ recipe))) (eask-start - (if-let ((recipe (eask-recipe-string)) - (name (eask-guess-package-name))) + (if-let* ((recipe (eask-recipe-string)) + (name (eask-guess-package-name))) (progn (eask-msg "") (eask-msg "recipes/%s:" name) diff --git a/lisp/core/reinstall.el b/lisp/core/reinstall.el index 8f137ea2..d0e0cb5a 100644 --- a/lisp/core/reinstall.el +++ b/lisp/core/reinstall.el @@ -36,7 +36,7 @@ (eask-start (eask-defvc< 27 (eask-pkg-init)) ; XXX: remove this after we drop 26.x - (if-let ((names (eask-args))) + (if-let* ((names (eask-args))) ;; If package [name..] are specified, we try to install it (eask-reinstall--packages names) (if-let* ((name (intern (eask-guess-package-name))) diff --git a/lisp/core/search.el b/lisp/core/search.el index a9065927..cf7a90e7 100644 --- a/lisp/core/search.el +++ b/lisp/core/search.el @@ -31,7 +31,7 @@ (eask-start (eask-pkg-init) - (if-let ((queries (eask-args))) + (if-let* ((queries (eask-args))) (let ((result)) (dolist (query queries) (setq result (append result (eask-search--packages query)))) diff --git a/lisp/core/status.el b/lisp/core/status.el index 04eb112f..cf74fe3b 100644 --- a/lisp/core/status.el +++ b/lisp/core/status.el @@ -85,8 +85,8 @@ ("Invocation" ,invocation-directory) ("Build No." ,emacs-build-number) ("System configuration" ,system-configuration) - ,(when-let ((emacs-build-time) - (time (format-time-string "%Y-%m-%d" emacs-build-time))) + ,(when-let* ((emacs-build-time) + (time (format-time-string "%Y-%m-%d" emacs-build-time))) `("Build time" ,time)) ("System type" ,system-type))) diff --git a/lisp/core/uninstall.el b/lisp/core/uninstall.el index 3e687559..7ddc9ad9 100644 --- a/lisp/core/uninstall.el +++ b/lisp/core/uninstall.el @@ -35,7 +35,7 @@ (eask-start (eask-defvc< 27 (eask-pkg-init)) ; XXX: remove this after we drop 26.x - (if-let ((names (eask-args))) + (if-let* ((names (eask-args))) (eask-uninstall--packages names) (if-let* ((name (intern (eask-guess-package-name))) ((package-installed-p name))) diff --git a/lisp/core/upgrade.el b/lisp/core/upgrade.el index 963715e1..03dbad6f 100644 --- a/lisp/core/upgrade.el +++ b/lisp/core/upgrade.el @@ -58,7 +58,7 @@ (defun eask-upgrade--package-all () "Upgrade for archive packages." - (if-let ((upgrades (eask-package--upgrades))) + (if-let* ((upgrades (eask-package--upgrades))) (progn (mapc #'eask-upgrade--package upgrades) (eask-msg "") @@ -68,7 +68,7 @@ (eask-start (eask-pkg-init) - (if-let ((names (eask-args))) + (if-let* ((names (eask-args))) (dolist (name names) (setq name (intern name)) (if (package-installed-p name) diff --git a/lisp/extern/package-build/25/package-build.el b/lisp/extern/package-build/25/package-build.el index 78d37ff3..1ecd424f 100644 --- a/lisp/extern/package-build/25/package-build.el +++ b/lisp/extern/package-build/25/package-build.el @@ -597,7 +597,7 @@ value specified in the file \"NAME.el\"." nil t) (match-string-no-properties 1))) "No description available.") - (when-let ((require-lines (lm-header-multiline "package-requires"))) + (when-let* ((require-lines (lm-header-multiline "package-requires"))) (package--prepare-dependencies (package-read-from-string (mapconcat #'identity require-lines " ")))) :kind (or kind 'single) diff --git a/lisp/extern/package-build/25/package-recipe.el b/lisp/extern/package-build/25/package-recipe.el index 2613f7d1..52b1e784 100644 --- a/lisp/extern/package-build/25/package-recipe.el +++ b/lisp/extern/package-build/25/package-recipe.el @@ -190,7 +190,7 @@ file is invalid, then raise an error." (let ((val (plist-get plist key))) (when val (cl-assert (stringp val) nil "%s must be a string but is %S" key val)))) - (when-let ((spec (plist-get plist :files))) + (when-let* ((spec (plist-get plist :files))) ;; `:defaults' is only allowed as the first element. ;; If we find it in that position, skip over it. (when (eq (car spec) :defaults) diff --git a/lisp/extern/package-build/26/package-build.el b/lisp/extern/package-build/26/package-build.el index 375897c1..e7305c6a 100644 --- a/lisp/extern/package-build/26/package-build.el +++ b/lisp/extern/package-build/26/package-build.el @@ -365,7 +365,7 @@ main library to a version that qualifies as a release, ignoring any pre-releases. Return (COMMIT-HASH COMMITTER-DATE VERSION-STRING)." - (when-let ((lib (package-build--main-library rcp))) + (when-let* ((lib (package-build--main-library rcp))) (with-temp-buffer (let (commit date version) (save-excursion @@ -426,7 +426,7 @@ Return (COMMIT-HASH COMMITTER-DATE VERSION-STRING)." (defun package-build-pkg-version (rcp) "Return version specified in the \"NAME-pkg.el\" file. Return (COMMIT-HASH COMMITTER-DATE VERSION-STRING)." - (when-let ((file (package-build--pkgfile rcp))) + (when-let* ((file (package-build--pkgfile rcp))) (let ((regexp (or (oref rcp version-regexp) package-build-version-regexp)) commit date version) (catch 'before-latest @@ -617,8 +617,8 @@ Return (COMMIT-HASH COMMITTER-DATE VERSION-STRING). (list rcommit rtime (package-version-join version)))))) (defun package-build--ensure-count-increase (rcp version ahead) - (if-let ((previous (cdr (assq (intern (oref rcp name)) - (package-build-archive-alist))))) + (if-let* ((previous (cdr (assq (intern (oref rcp name)) + (package-build-archive-alist))))) ;; Because upstream may have rewritten history, we cannot be certain ;; that appending the new count of commits would result in a version ;; string that is greater than the version string used for the @@ -993,7 +993,7 @@ value specified in the file \"NAME.el\"." (if (fboundp 'lm-maintainers) (lm-maintainers) (with-no-warnings - (when-let ((maintainer (lm-maintainer))) + (when-let* ((maintainer (lm-maintainer))) (list maintainer))))) (package-desc-from-define name version @@ -1003,7 +1003,7 @@ value specified in the file \"NAME.el\"." ^;;; [^ ]*\\.el ---[ \t]*\\(.*?\\)[ \t]*\\(-\\*-.*-\\*-[ \t]*\\)?$" nil t) (match-string-no-properties 1))) "No description available.") - (when-let ((require-lines (lm-header-multiline "package-requires"))) + (when-let* ((require-lines (lm-header-multiline "package-requires"))) (package--prepare-dependencies (package-read-from-string (mapconcat #'identity require-lines " ")))) @@ -1564,13 +1564,13 @@ a package." (defun package-build--archive-alist-for-json () "Return the archive alist in a form suitable for JSON encoding." (cl-flet ((format-person - (person) - (let ((name (car person)) - (mail (cdr person))) - (if (and name mail) - (format "%s <%s>" name mail) - (or name - (format "<%s>" mail)))))) + (person) + (let ((name (car person)) + (mail (cdr person))) + (if (and name mail) + (format "%s <%s>" name mail) + (or name + (format "<%s>" mail)))))) (cl-mapcan (lambda (entry) (list (intern (format ":%s" (car entry))) (let* ((info (cdr entry)) diff --git a/lisp/extern/package-build/26/package-recipe.el b/lisp/extern/package-build/26/package-recipe.el index fddc9655..e4d79d18 100644 --- a/lisp/extern/package-build/26/package-recipe.el +++ b/lisp/extern/package-build/26/package-recipe.el @@ -191,7 +191,7 @@ file is invalid, then raise an error." (let ((val (plist-get plist key))) (when val (cl-assert (stringp val) nil "%s must be a string but is %S" key val)))) - (when-let ((spec (plist-get plist :files))) + (when-let* ((spec (plist-get plist :files))) ;; `:defaults' is only allowed as the first element. ;; If we find it in that position, skip over it. (when (eq (car spec) :defaults) diff --git a/lisp/generate/recipe.el b/lisp/generate/recipe.el index a16b7f53..3d59dd42 100644 --- a/lisp/generate/recipe.el +++ b/lisp/generate/recipe.el @@ -25,8 +25,8 @@ ;;; Core (eask-start - (if-let ((recipe (eask-recipe-string)) - (name (eask-guess-package-name))) + (if-let* ((recipe (eask-recipe-string)) + (name (eask-guess-package-name))) (let* ((eask-recipe-path (or (eask-args 0) eask-recipe-path)) (eask-recipe-path (expand-file-name eask-recipe-path)) (recipe-file (expand-file-name name eask-recipe-path)) diff --git a/lisp/init/cask.el b/lisp/init/cask.el index 95ef4ecb..1d245372 100644 --- a/lisp/init/cask.el +++ b/lisp/init/cask.el @@ -168,14 +168,14 @@ Optional argument CONTENTS is used for nested directives. e.g. development." (insert "\n " (eask-2str file)))) (insert ")\n")) - (when-let ((pkg-desc (eask--cask-package-descriptor))) + (when-let* ((pkg-desc (eask--cask-package-descriptor))) (insert "\n") (insert "(package-descriptor \"" (eask-2str pkg-desc) "\")\n")) (insert "\n") (insert "(script \"test\" \"echo \\\"Error: no test specified\\\" && exit 1\")\n") - (when-let ((sources (eask--cask-sources))) + (when-let* ((sources (eask--cask-sources))) (insert "\n") (dolist (source sources) (insert "(source '" (eask-2str (cadr source)) ")\n"))) @@ -185,13 +185,13 @@ Optional argument CONTENTS is used for nested directives. e.g. development." (unless (eask--cask-reqs-no-emacs) (insert "\n")) ; Make sure end line exists! - (when-let ((pkgs (eask--cask-reqs-no-emacs))) + (when-let* ((pkgs (eask--cask-reqs-no-emacs))) (insert "\n") (dolist (pkg pkgs) (let ((val (mapconcat #'eask-2str (cdr pkg) "\" \""))) (insert "(depends-on \"" val "\")\n")))) - (when-let ((pkgs (eask--cask-reqs-dev-no-emacs))) + (when-let* ((pkgs (eask--cask-reqs-dev-no-emacs))) (insert "\n") (insert "(development\n") (dolist (pkg pkgs) diff --git a/lisp/init/keg.el b/lisp/init/keg.el index 0cd7b28c..03c7b323 100644 --- a/lisp/init/keg.el +++ b/lisp/init/keg.el @@ -88,7 +88,7 @@ If no found the Keg file, returns nil." entry-point))) (insert content) - (when-let ((scripts (alist-get 'scripts contents))) + (when-let* ((scripts (alist-get 'scripts contents))) (dolist (script scripts) (let* ((cmds (cadr script)) (_ (pop cmds)) @@ -96,7 +96,7 @@ If no found the Keg file, returns nil." (insert "(script \"" (eask-2str (car script)) "\" " (prin1-to-string cmds) ")\n")))) - (when-let ((sources (alist-get 'sources contents))) + (when-let* ((sources (alist-get 'sources contents))) (insert "\n") (dolist (source sources) (insert "(source '" (eask-2str source) ")\n"))) @@ -106,12 +106,12 @@ If no found the Keg file, returns nil." (unless (alist-get 'packages contents) (insert "\n")) ; Make sure end line exists! - (when-let ((pkgs (alist-get 'packages contents))) + (when-let* ((pkgs (alist-get 'packages contents))) (insert "\n") (dolist (pkg pkgs) (insert "(depends-on \"" (eask-2str (car pkg)) "\")\n"))) - (when-let ((devs (alist-get 'devs contents))) + (when-let* ((devs (alist-get 'devs contents))) (insert "\n") (insert "(development\n") (dolist (dev devs) diff --git a/lisp/init/source.el b/lisp/init/source.el index 0535231e..514e46f0 100644 --- a/lisp/init/source.el +++ b/lisp/init/source.el @@ -88,7 +88,7 @@ ;; Files found, do the action! (files (dolist (file files) - (when-let ((new-filename (eask-init-source--convert file))) + (when-let* ((new-filename (eask-init-source--convert file))) (push new-filename converted-files))) ;; Automatically rename file into Eask file when only one file is converted! (when (= (length converted-files) 1) diff --git a/lisp/run/command.el b/lisp/run/command.el index 7062169d..772d62f5 100644 --- a/lisp/run/command.el +++ b/lisp/run/command.el @@ -56,8 +56,8 @@ ((eask-all-p) (dolist (name (reverse eask-commands)) (eask-run-command--execute name))) - ((when-let ((commands (eask-args))) - (if-let ((unmatched (eask-run-command--unmatched-commands commands))) + ((when-let* ((commands (eask-args))) + (if-let* ((unmatched (eask-run-command--unmatched-commands commands))) (progn ; if there are unmatched commands, don't even try to execute (eask-info "(Missing command%s: `%s`)" (eask--sinr unmatched "" "s") diff --git a/lisp/run/script.el b/lisp/run/script.el index 5673d4e0..7a670acb 100644 --- a/lisp/run/script.el +++ b/lisp/run/script.el @@ -67,8 +67,8 @@ ((eask-all-p) ; Run all scripts (dolist (data (reverse eask-scripts)) (eask-run-command--export (cdr data)))) - ((when-let ((scripts (eask-args))) - (if-let ((unmatched (eask-run-script--unmatched-scripts scripts))) + ((when-let* ((scripts (eask-args))) + (if-let* ((unmatched (eask-run-script--unmatched-scripts scripts))) (progn ; if there are unmatched scripts, don't even try to execute (eask-info "(Missing script%s: `%s`)" (eask--sinr unmatched "" "s") diff --git a/lisp/source/add.el b/lisp/source/add.el index 11d640c9..f195ca6c 100644 --- a/lisp/source/add.el +++ b/lisp/source/add.el @@ -86,8 +86,8 @@ The argument EXISTS is use to search for correct position to insert new source." "Ask source overwrite if needed. Arguments NAME and URL are main arguments for this command." - (if-let ((exists (assoc name package-archives)) - (old-url (cdr exists))) + (if-let* ((exists (assoc name package-archives)) + (old-url (cdr exists))) (cond ((string= old-url url) (eask-info "(Nothing has changed due to the URLs are the same)")) ((yes-or-no-p diff --git a/lisp/source/delete.el b/lisp/source/delete.el index f70a62ab..c6bca637 100644 --- a/lisp/source/delete.el +++ b/lisp/source/delete.el @@ -31,7 +31,7 @@ (eask-start (let* ((args (eask-args)) (name (nth 0 args))) - (if-let ((exists (assoc name package-archives))) + (if-let* ((exists (assoc name package-archives))) (eask-source-delete name) (eask-info "(Invalid source name, `%s')" name) (eask-help "source/delete"))))