summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2024-10-24 16:50:07 +0800
committerSean Whitton <spwhitton@spwhitton.name>2024-10-24 16:50:07 +0800
commit8903106bb783c2825233c149b6799960aacdea57 (patch)
tree85b6b33f343d0167ff0454c034dd9018488a92f5 /lisp/emacs-lisp
parent698d75a3355673773c095081c0000e52c36f93f0 (diff)
downloademacs-8903106bb783c2825233c149b6799960aacdea57.tar.gz
emacs-8903106bb783c2825233c149b6799960aacdea57.tar.bz2
emacs-8903106bb783c2825233c149b6799960aacdea57.zip
Mark if-let and when-let obsolete
* lisp/subr.el (if-let*, when-let*, if-let, when-let): Mark if-let and when-let obsolete (bug#73853 and elsewhere). Move docstring text around so that if-let* and when-let* descriptions no longer refer to if-let and when-let. * etc/NEWS: Announce the change. * admin/admin.el (reminder-for-release-blocking-bugs): * doc/misc/erc.texi (display-buffer): * lisp/ansi-color.el (ansi-color-apply) (ansi-color--face-vec-face): * lisp/ansi-osc.el (ansi-osc-apply-on-region) (ansi-osc-hyperlink): * lisp/arc-mode.el (archive-goto-file) (archive-next-file-displayer): * lisp/auth-source-pass.el (auth-source-pass-search) (auth-source-pass--parse-data) (auth-source-pass--find-match-many): * lisp/autorevert.el (auto-revert-notify-rm-watch): * lisp/buff-menu.el (Buffer-menu-unmark-all-buffers) (Buffer-menu-group-by-root): * lisp/calendar/parse-time.el (parse-iso8601-time-string): * lisp/cedet/pulse.el (pulse-tick): * lisp/comint.el (comint--fontify-input-ppss-flush-indirect) (comint--intersect-regions): * lisp/completion-preview.el (completion-preview--try-table) (completion-preview--capf-wrapper, completion-preview--update): * lisp/cus-edit.el (setopt--set) (custom-dirlocals-maybe-update-cons, custom-dirlocals-validate): * lisp/custom.el (load-theme): * lisp/descr-text.el (describe-char): * lisp/desktop.el (desktop--emacs-pid-running-p): * lisp/dired-x.el (menu): * lisp/dired.el (dired-font-lock-keywords) (dired-insert-directory, dired--insert-disk-space, dired-mode): * lisp/dnd.el (dnd-handle-multiple-urls): * lisp/dom.el (dom-remove-attribute): * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): * lisp/emacs-lisp/bytecomp.el (bytecomp--custom-declare): * lisp/emacs-lisp/comp-common.el (comp-function-type-spec): * lisp/emacs-lisp/comp-cstr.el (comp--all-classes) (comp-cstr-set-range-for-arithm, comp--cstr-union-1-no-mem) (comp-cstr-intersection-no-mem, comp-cstr-fixnum-p) (comp-cstr-type-p): * lisp/emacs-lisp/comp-run.el (comp-subr-trampoline-install) (native--compile-async): * lisp/emacs-lisp/comp.el (comp--get-function-cstr) (comp--function-pure-p, comp--intern-func-in-ctxt) (comp--addr-to-bb-name, comp--emit-assume, comp--maybe-add-vmvar) (comp--add-call-cstr, comp--compute-dominator-tree) (comp--dom-tree-walker, comp--ssa-rename) (comp--function-call-maybe-fold, comp--fwprop-call) (comp--call-optim-func): * lisp/emacs-lisp/edebug.el (edebug-global-prefix) (edebug-remove-instrumentation): * lisp/emacs-lisp/eieio.el (initialize-instance): * lisp/emacs-lisp/ert-x.el (ert-resource-directory): * lisp/emacs-lisp/ert.el (ert--expand-should-1) (ert-test-location, ert-write-junit-test-report) (ert-test--erts-test): * lisp/emacs-lisp/icons.el (icon-complete-spec, icon-string) (icons--create): * lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p): * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload) (loaddefs-generate--parse-file): * lisp/emacs-lisp/multisession.el (multisession-edit-mode--revert, multisession-edit-value): * lisp/emacs-lisp/package-vc.el (package-vc--read-archive-data) (package-vc--version, package-vc--clone): * lisp/emacs-lisp/package.el (package--reload-previously-loaded): * lisp/emacs-lisp/pp.el (pp--insert-lisp): * lisp/emacs-lisp/subr-x.el (add-display-text-property): * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): * lisp/emacs-lisp/timer.el (run-at-time): * lisp/emacs-lisp/vtable.el (vtable-goto-table) (vtable-goto-column, vtable-update-object, vtable--insert-line) (vtable--compute-widths, vtable--make-keymap): * lisp/emacs-lisp/warnings.el (display-warning): * lisp/epa-file.el (epa-file-insert-file-contents): * lisp/epa.el (epa-show-key): * lisp/erc/erc-backend.el (erc--split-line, erc--conceal-prompt) (PRIVMSG, erc--get-isupport-entry): * lisp/erc/erc-button.el (erc-button-add-nickname-buttons) (erc--button-next): * lisp/erc/erc-common.el (erc--find-group): * lisp/erc/erc-fill.el (erc-fill, erc-fill-static) (erc-fill--wrap-escape-hidden-speaker) (erc-fill--wrap-unmerge-on-date-stamp) (erc-fill--wrap-massage-initial-message-post-clear) (erc-fill-wrap, erc-fill--wrap-rejigger-region): * lisp/erc/erc-goodies.el (erc--scrolltobottom-all) (erc--keep-place-indicator-on-window-buffer-change) (keep-place-indicator, erc--keep-place-indicator-adjust-on-clear) (erc-keep-place-move, erc--command-indicator-display): * lisp/erc/erc-ibuffer.el (erc-members): * lisp/erc/erc-join.el (erc-join--remove-requested-channel) (erc-autojoin--join): * lisp/erc/erc-networks.el (erc-networks--id-qualifying-init-parts, erc-networks--id-reload) (erc-networks--id-ensure-comparable) (erc-networks--reclaim-orphaned-target-buffers) (erc-networks--server-select): * lisp/erc/erc-nicks.el (erc-nicks-invert) (erc-nicks--redirect-face-widget-link, erc-nicks--highlight) (erc-nicks--highlight-button) (erc-nicks--list-faces-help-button-action, erc-nicks-list-faces) (erc-nicks-refresh, erc-nicks--colors-from-faces) (erc-nicks--track-prioritize) (erc-nicks--remember-face-for-track): * lisp/erc/erc-notify.el (querypoll, erc--querypoll-get-next) (erc--querypoll-on-352, erc--querypoll-send): * lisp/erc/erc-sasl.el (erc-sasl--read-password): * lisp/erc/erc-services.el (erc-services-issue-ghost-and-retry-nick): * lisp/erc/erc-speedbar.el (erc-speedbar--ensure, nickbar) (erc-speedbar-toggle-nicknames-window-lock) (erc-speedbar--compose-nicks-face): * lisp/erc/erc-stamp.el (erc-stamp--recover-on-reconnect) (erc-stamp-prefix-log-filter, erc--conceal-prompt) (erc--insert-timestamp-left, erc-insert-timestamp-right) (erc-stamp--defer-date-insertion-on-post-modify) (erc-insert-timestamp-left-and-right) (erc-stamp--redo-right-stamp-post-clear) (erc-stamp--reset-on-clear, erc-stamp--dedupe-date-stamps): * lisp/erc/erc-status-sidebar.el (bufbar) (erc-status-sidebar-prefer-target-as-name) (erc-status-sidebar-default-allsort, erc-status-sidebar-click): * lisp/erc/erc-track.el (erc-track--shortened-names-get) (erc-track--setup, erc-track--select-mode-line-face) (erc-track-modified-channels, erc-track--collect-faces-in) (erc-track--switch-buffer, erc-track--replace-killed-buffer): * lisp/erc/erc-truncate.el (erc-truncate--setup) (erc-truncate-buffer): * lisp/erc/erc.el (erc--ensure-query-member) (erc--ensure-query-members, erc--remove-channel-users-but) (erc--cusr-change-status, erc--find-mode, erc--update-modules) (erc-log-irc-protocol, erc--refresh-prompt) (erc--restore-important-text-props) (erc--order-text-properties-from-hash, erc-send-input-line) (erc-cmd-IGNORE, erc--unignore-user, erc-cmd-QUERY) (erc-cmd-BANLIST, erc--speakerize-nick) (erc--format-speaker-input-message, erc-channel-receive-names) (erc-send-current-line, erc-format-target-and/or-network) (erc-kill-buffer-function, erc-restore-text-properties) (erc--get-eq-comparable-cmd): * lisp/eshell/em-alias.el (eshell-maybe-replace-by-alias--which) (eshell-maybe-replace-by-alias): * lisp/eshell/em-glob.el (eshell-glob-convert): * lisp/eshell/em-pred.el (eshell-pred-user-or-group) (eshell-pred-file-time, eshell-pred-file-type) (eshell-pred-file-mode, eshell-pred-file-links) (eshell-pred-file-size): * lisp/eshell/em-prompt.el (eshell-forward-paragraph) (eshell-next-prompt): * lisp/eshell/esh-arg.el (eshell-resolve-current-argument): * lisp/eshell/esh-cmd.el (eshell-do-eval, eshell/which) (eshell-plain-command--which, eshell-plain-command): * lisp/eshell/esh-io.el (eshell-duplicate-handles) (eshell-protect-handles, eshell-get-target, eshell-close-target): * lisp/eshell/esh-proc.el (eshell-sentinel): * lisp/eshell/esh-var.el (eshell-parse-variable-ref) (eshell-get-variable, eshell-set-variable): * lisp/faces.el (face-at-point): * lisp/ffap.el (ffap-in-project): * lisp/filenotify.el (file-notify--rm-descriptor): * lisp/files-x.el (read-dir-locals-file) (connection-local-update-profile-variables) (connection-local-value): * lisp/files.el (file-remote-p, abbreviate-file-name) (set-auto-mode, hack-local-variables) (revert-buffer-restore-read-only): * lisp/find-dired.el (find-dired-sort-by-filename): * lisp/font-lock.el (font-lock--filter-keywords): * lisp/gnus/gnus-art.el (article-emojize-symbols): * lisp/gnus/gnus-int.el (gnus-close-server): * lisp/gnus/gnus-search.el (gnus-search-transform) (gnus-search-indexed-parse-output, gnus-search-server-to-engine): * lisp/gnus/gnus-sum.el (gnus-collect-urls, gnus-shorten-url): * lisp/gnus/gnus.el (gnus-check-backend-function): * lisp/gnus/message.el (message-send-mail): * lisp/gnus/mml.el (mml-generate-mime, mml-insert-mime-headers): * lisp/gnus/nnatom.el (nnatom--read-feed, nnatom--read-article) (nnatom--read-article-or-group-authors, nnatom--read-publish) (nnatom--read-update, nnatom--read-links): * lisp/gnus/nnfeed.el (nnfeed--read-server, nnfeed--write-server) (nnfeed--parse-feed, nnfeed--group-data, nnfeed-retrieve-article) (nnfeed-retrieve-headers, nnfeed--print-part) (nnfeed-request-article, nnfeed-request-group) (nnfeed-request-list, nnfeed--group-description) (nnfeed-request-group-description) (nnfeed-request-list-newsgroups, nnfeed-request-rename-group): * lisp/gnus/nnmh.el (nnmh-update-gnus-unreads): * lisp/help-fns.el (help-find-source) (help-fns--insert-menu-bindings, help-fns--mention-first-release) (help-fns--mention-shortdoc-groups) (help-fns--customize-variable-version) (help-fns--face-custom-version-info, describe-mode): * lisp/help-mode.el (help-make-xrefs): * lisp/help.el (help-key-description, help--describe-command): * lisp/hfy-cmap.el (htmlfontify-load-rgb-file): * lisp/ibuf-ext.el (ibuffer-jump-to-filter-group) (ibuffer-kill-filter-group, ibuffer-kill-line) (ibuffer-save-filter-groups, ibuffer-save-filters, filename) (basename, file-extension, ibuffer-diff-buffer-with-file-1) (ibuffer-mark-by-file-name-regexp) (ibuffer-mark-by-content-regexp): * lisp/ibuf-macs.el (ibuffer-aif, ibuffer-awhen): * lisp/ibuffer.el (ibuffer-mouse-toggle-mark) (ibuffer-toggle-marks, ibuffer-mark-interactive) (ibuffer-compile-format, process, ibuffer-map-lines): * lisp/image.el (image--compute-map) (image--compute-original-map): * lisp/image/exif.el (exif-parse-buffer): * lisp/image/image-converter.el (image-convert-p, image-convert) (image-converter--find-converter): * lisp/image/image-dired-util.el (image-dired-file-name-at-point): * lisp/image/image-dired.el (image-dired-track-original-file) (image-dired--on-file-in-dired-buffer) (image-dired--with-thumbnail-buffer) (image-dired-jump-original-dired-buffer) (image-dired--slideshow-step, image-dired-display-image): * lisp/image/wallpaper.el (wallpaper--init-action-kill) (wallpaper--find-setter, wallpaper--find-command) (wallpaper--find-command-args, wallpaper--x-monitor-name): * lisp/info-look.el (info-lookup-interactive-arguments) (info-complete)::(:mode): * lisp/info.el (info-pop-to-buffer, Info-read-node-name-1): * lisp/international/emoji.el (emoji--adjust-displayable-1) (emoji--add-recent): * lisp/jsonrpc.el (jsonrpc--call-deferred) (jsonrpc--process-sentinel, jsonrpc--remove): * lisp/keymap.el (keymap-local-lookup): * lisp/mail/emacsbug.el (report-emacs-bug-hook) (submit-emacs-patch): * lisp/mail/ietf-drums.el (ietf-drums-parse-addresses): * lisp/mail/mailclient.el (mailclient-send-it): * lisp/mail/rfc6068.el (rfc6068-parse-mailto-url): * lisp/mail/undigest.el (rmail-digest-parse-mixed-mime): * lisp/minibuffer.el (completion-metadata-get) (completions--after-change) (minibuffer-visible-completions--filter): * lisp/net/browse-url.el (browse-url-url-at-point) (browse-url-file-url, browse-url-emacs): * lisp/net/dbus.el (dbus-byte-array-to-string) (dbus-monitor-goto-serial): * lisp/net/dictionary.el (dictionary-search): * lisp/net/eww.el (eww--download-directory) (eww-auto-rename-buffer, eww-open-in-new-buffer, eww-submit) (eww-follow-link, eww-read-alternate-url) (eww-copy-alternate-url): * lisp/net/goto-addr.el (goto-address-at-point): * lisp/net/mailcap.el (mailcap-mime-info): * lisp/net/rcirc.el (rcirc, rcirc-connect, rcirc-send-string) (rcirc-kill-buffer-hook, rcirc-print, rcirc-when) (rcirc-color-attributes, rcirc-handler-NICK) (rcirc-handler-TAGMSG, rcirc-handler-BATCH): * lisp/net/shr.el (shr-descend, shr-adaptive-fill-function) (shr-correct-dom-case, shr-tag-a): * lisp/net/sieve.el (sieve-manage-quit): * lisp/outline.el (outline-cycle-buffer): * lisp/pcmpl-git.el (pcmpl-git--tracked-file-predicate): * lisp/proced.el (proced-auto-update-timer): * lisp/progmodes/bug-reference.el (bug-reference-try-setup-from-vc): * lisp/progmodes/c-ts-common.el (c-ts-common--fill-paragraph): * lisp/progmodes/c-ts-mode.el (c-ts-mode--preproc-offset) (c-ts-mode--anchor-prev-sibling, c-ts-mode-indent-defun): * lisp/progmodes/compile.el (compilation-error-properties) (compilation-find-file-1): * lisp/progmodes/eglot.el (eglot--check-object) (eglot--read-server, eglot-upgrade-eglot) (eglot-handle-notification, eglot--CompletionParams) (eglot-completion-at-point, eglot--sig-info) (eglot-register-capability): * lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile-and-load) (elisp-eldoc-var-docstring-with-value): * lisp/progmodes/erts-mode.el (erts-mode--goto-start-of-test): * lisp/progmodes/flymake.el (flymake--update-eol-overlays) (flymake-eldoc-function): * lisp/progmodes/gdb-mi.el (gdb-breakpoints-list-handler-custom) (gdb-frame-handler): * lisp/progmodes/go-ts-mode.el (go-ts-mode-docstring) (go-ts-mode--comment-on-previous-line-p) (go-ts-mode--get-test-regexp-at-point) (go-ts-mode-test-this-file): * lisp/progmodes/grep.el (lgrep, rgrep-default-command) (grep-file-at-point): * lisp/progmodes/perl-mode.el (perl--end-of-format-p): * lisp/progmodes/php-ts-mode.el (php-ts-mode--anchor-prev-sibling, php-ts-mode--indent-defun): * lisp/progmodes/project.el (project--other-place-command) (project--find-default-from, project--transplant-file-name) (project-prefixed-buffer-name, project--remove-from-project-list) (project-prompt-project-name, project-remember-projects-under) (project--switch-project-command) (project-uniquify-dirname-transform, project-mode-line-format): * lisp/progmodes/python.el (python-font-lock-keywords-maximum-decoration) (python--treesit-fontify-union-types) (python-shell-get-process-name, python-shell-restart) (python-shell-completion-at-point, python-ffap-module-path) (python-util-comint-end-of-output-p, python--import-sources) (python-add-import, python-remove-import, python-fix-imports): * lisp/progmodes/xref.el (xref--add-log-current-defun): * lisp/repeat.el (repeat-echo-message-string): * lisp/saveplace.el (save-place-dired-hook): * lisp/server.el (server-save-buffers-kill-terminal): * lisp/shadowfile.el (shadow-make-fullname) (shadow-contract-file-name, shadow-define-literal-group): * lisp/shell.el (shell-highlight-undef-mode): * lisp/simple.el (command-completion-using-modes-p) (command-execute, file-user-uid, file-group-gid) (first-completion, last-completion, switch-to-completions): * lisp/startup.el (startup--load-user-init-file): * lisp/tab-line.el (tab-line-tabs-buffer-group-by-project): * lisp/tar-mode.el (tar-goto-file, tar-next-file-displayer): * lisp/term/android-win.el (android-encode-select-string) (gui-backend-set-selection): * lisp/term/haiku-win.el (haiku-dnd-convert-string) (haiku-select-encode-xstring, haiku-select-encode-utf-8-string): * lisp/textmodes/emacs-news-mode.el (emacs-news--buttonize): * lisp/textmodes/ispell.el (ispell-completion-at-point): * lisp/textmodes/sgml-mode.el (sgml-validate) (html-mode--complete-at-point): * lisp/textmodes/tex-mode.el (tex-recenter-output-buffer) (xref-backend-references): * lisp/thingatpt.el (thing-at-point-file-at-point) (thing-at-point-face-at-point): * lisp/thread.el (thread-list--get-status): * lisp/time.el (world-clock-copy-time-as-kill, world-clock): * lisp/touch-screen.el (touch-screen-handle-touch): * lisp/treesit.el (treesit-language-at, treesit-node-at) (treesit-node-on, treesit-buffer-root-node) (treesit-node-field-name, treesit-local-parsers-at) (treesit-local-parsers-on, treesit--cleanup-local-range-overlays) (treesit-font-lock-recompute-features) (treesit-font-lock-fontify-region, treesit-transpose-sexps) (treesit-add-log-current-defun, treesit-major-mode-setup) (treesit--explorer-refresh, treesit-install-language-grammar): * lisp/url/url.el (url-retrieve-synchronously): * lisp/vc/smerge-mode.el (smerge-diff): * lisp/vc/vc-dir.el (vc-dir): * lisp/vc/vc-dispatcher.el (vc-do-async-command): * lisp/vc/vc-git.el (vc-git-dir--branch-headers) (vc-git-dir--stash-headers, vc-git--log-edit-summary-check) (vc-git-stash-list): * lisp/vc/vc.el (vc-responsible-backend, vc-buffer-sync-fileset) (vc-clone): * lisp/visual-wrap.el (visual-wrap--apply-to-line): * lisp/wid-edit.el (widget-text) (widget-editable-list-insert-before): * lisp/window-tool-bar.el (window-tool-bar--keymap-entry-to-string): * lisp/window.el (display-buffer, display-buffer-full-frame) (window-point-context-set, window-point-context-use) (window-point-context-use-default-function): * lisp/xdg.el (xdg-current-desktop): * lisp/xwidget.el (xwidget-webkit-callback): * lisp/yank-media.el (yank-media--get-selection) (yank-media-types): * test/lisp/comint-tests.el (comint-tests/test-password-function): * test/lisp/completion-preview-tests.el (completion-preview-tests--capf): * test/lisp/cus-edit-tests.el (with-cus-edit-test): * test/lisp/erc/erc-scenarios-base-local-modules.el (-phony-sblm-): * test/lisp/erc/erc-scenarios-stamp.el (erc-scenarios-stamp--on-post-modify): * test/lisp/erc/erc-services-tests.el (erc-services-tests--asp-parse-entry): * test/lisp/erc/erc-tests.el (erc-modules--internal-property) (erc--find-mode, erc-tests--update-modules): * test/lisp/erc/resources/erc-d/erc-d-i.el (erc-d-i--parse-message): * test/lisp/erc/resources/erc-d/erc-d-t.el (erc-d-t-kill-related-buffers, erc-d-t-with-cleanup): * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-i--parse-message--irc-parser-tests): * test/lisp/erc/resources/erc-d/erc-d-u.el (erc-d-u--read-exchange-slowly): * test/lisp/erc/resources/erc-d/erc-d.el (erc-d--expire) (erc-d--finalize-done, erc-d--command-handle-all): * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common-with-cleanup): * test/lisp/erc/resources/erc-tests-common.el (erc-tests--common-display-message) (erc-tests-common-create-subprocess): * test/lisp/ibuffer-tests.el (ibuffer-test-Bug25058): * test/lisp/international/mule-tests.el (mule-cmds-tests--ucs-names-missing-names): * test/lisp/progmodes/python-tests.el (python-tests-get-shell-interpreter) (python-tests--get-interpreter-info): * test/lisp/progmodes/ruby-ts-mode-tests.el (ruby-ts-resource-file): * test/lisp/replace-tests.el (replace-tests-with-undo): * test/src/emacs-tests.el (emacs-tests--seccomp-debug): * test/src/process-tests.el (process-tests--emacs-command) (process-tests--emacs-binary, process-tests--dump-file): * test/src/treesit-tests.el (treesit--ert-test-defun-navigation): Replace use of the now-obsolete if-let and when-let.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/byte-opt.el2
-rw-r--r--lisp/emacs-lisp/bytecomp.el6
-rw-r--r--lisp/emacs-lisp/comp-common.el4
-rw-r--r--lisp/emacs-lisp/comp-cstr.el20
-rw-r--r--lisp/emacs-lisp/comp-run.el6
-rw-r--r--lisp/emacs-lisp/comp.el72
-rw-r--r--lisp/emacs-lisp/edebug.el8
-rw-r--r--lisp/emacs-lisp/eieio.el8
-rw-r--r--lisp/emacs-lisp/ert-x.el4
-rw-r--r--lisp/emacs-lisp/ert.el34
-rw-r--r--lisp/emacs-lisp/icons.el26
-rw-r--r--lisp/emacs-lisp/lisp-mode.el12
-rw-r--r--lisp/emacs-lisp/loaddefs-gen.el8
-rw-r--r--lisp/emacs-lisp/multisession.el6
-rw-r--r--lisp/emacs-lisp/package-vc.el8
-rw-r--r--lisp/emacs-lisp/package.el32
-rw-r--r--lisp/emacs-lisp/pp.el4
-rw-r--r--lisp/emacs-lisp/subr-x.el2
-rw-r--r--lisp/emacs-lisp/tabulated-list.el4
-rw-r--r--lisp/emacs-lisp/timer.el2
-rw-r--r--lisp/emacs-lisp/vtable.el28
-rw-r--r--lisp/emacs-lisp/warnings.el2
22 files changed, 149 insertions, 149 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index d8dbfa62bf9..0a89a33cbc3 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -483,7 +483,7 @@ There can be multiple entries for the same NAME if it has several aliases.")
`(,fn ,name . ,optimized-rest)))
((guard (when for-effect
- (if-let ((tmp (byte-opt--fget fn 'side-effect-free)))
+ (if-let* ((tmp (byte-opt--fget fn 'side-effect-free)))
(or byte-compile-delete-errors
(eq tmp 'error-free)))))
(byte-compile-log " %s called for effect; deleted" fn)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 29e7882c851..f058fc48cc7 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -5470,9 +5470,9 @@ FORM is used to provide location, `bytecomp--cus-function' and
(setq byte-compile-current-group name))
;; Check :local
- (when-let ((val (and (eq fun 'custom-declare-variable)
- (plist-get keyword-args :local)))
- (_ (not (member val '(t 'permanent 'permanent-only)))))
+ (when-let* ((val (and (eq fun 'custom-declare-variable)
+ (plist-get keyword-args :local)))
+ (_ (not (member val '(t 'permanent 'permanent-only)))))
(bytecomp--cus-warn form ":local keyword does not accept %S" val))))
(byte-compile-normal-call form))
diff --git a/lisp/emacs-lisp/comp-common.el b/lisp/emacs-lisp/comp-common.el
index e9b94681a4b..78720949b67 100644
--- a/lisp/emacs-lisp/comp-common.el
+++ b/lisp/emacs-lisp/comp-common.el
@@ -510,13 +510,13 @@ comes from `comp-primitive-type-specifiers' or the function type declaration
itself."
(let ((kind 'declared)
type-spec)
- (when-let ((res (assoc function comp-primitive-type-specifiers)))
+ (when-let* ((res (assoc function comp-primitive-type-specifiers)))
;; Declared primitive
(setf type-spec (cadr res)))
(let ((f (and (symbolp function)
(symbol-function function))))
(when (and f (null type-spec))
- (if-let ((delc-type (function-get function 'function-type)))
+ (if-let* ((delc-type (function-get function 'function-type)))
;; Declared Lisp function
(setf type-spec delc-type)
(when (native-comp-function-p f)
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index 3f70b42774f..e1350370750 100644
--- a/lisp/emacs-lisp/comp-cstr.el
+++ b/lisp/emacs-lisp/comp-cstr.el
@@ -89,10 +89,10 @@ Integer values are handled in the `range' slot.")
"Return all non built-in type names currently defined."
(let (res)
(mapatoms (lambda (x)
- (when-let ((class (cl-find-class x))
- ;; Ignore EIEIO classes as they can be
- ;; redefined at runtime.
- (gate (not (eq 'eieio--class (type-of class)))))
+ (when-let* ((class (cl-find-class x))
+ ;; Ignore EIEIO classes as they can be
+ ;; redefined at runtime.
+ (gate (not (eq 'eieio--class (type-of class)))))
(push x res)))
obarray)
res))
@@ -528,8 +528,8 @@ Return them as multiple value."
`(with-comp-cstr-accessors
(if (or (neg src1) (neg src2))
(setf (typeset ,dst) '(number))
- (when-let ((r1 (range ,src1))
- (r2 (range ,src2)))
+ (when-let* ((r1 (range ,src1))
+ (r2 (range ,src2)))
(let* ((l1 (comp-cstr-smallest-in-range r1))
(l2 (comp-cstr-smallest-in-range r2))
(h1 (comp-cstr-greatest-in-range r1))
@@ -620,7 +620,7 @@ DST is returned."
;; Check first if we are in the simple case of all input non-negate
;; or negated so we don't have to cons.
- (when-let ((res (comp--cstrs-homogeneous srcs)))
+ (when-let* ((res (comp--cstrs-homogeneous srcs)))
(apply #'comp--cstr-union-homogeneous range dst srcs)
(cl-return-from comp--cstr-union-1-no-mem dst))
@@ -805,7 +805,7 @@ Non memoized version of `comp-cstr-intersection-no-mem'."
(range dst) ()
(neg dst) nil)
(cl-return-from comp-cstr-intersection-no-mem dst)))
- (when-let ((res (comp--cstrs-homogeneous srcs)))
+ (when-let* ((res (comp--cstrs-homogeneous srcs)))
(if (eq res 'neg)
(apply #'comp--cstr-union-homogeneous t dst srcs)
(apply #'comp-cstr-intersection-homogeneous dst srcs))
@@ -917,7 +917,7 @@ Non memoized version of `comp-cstr-intersection-no-mem'."
(when (and (null (neg cstr))
(null (valset cstr))
(null (typeset cstr)))
- (when-let (range (range cstr))
+ (when-let* ((range (range cstr)))
(let* ((low (caar range))
(high (cdar (last range))))
(unless (or (eq low '-)
@@ -949,7 +949,7 @@ Non memoized version of `comp-cstr-intersection-no-mem'."
(or (null (typeset cstr))
(equal (typeset cstr) '(integer)))))))
(t
- (if-let ((pred (get type 'cl-deftype-satisfies)))
+ (if-let* ((pred (get type 'cl-deftype-satisfies)))
(and (null (range cstr))
(null (neg cstr))
(if (null (typeset cstr))
diff --git a/lisp/emacs-lisp/comp-run.el b/lisp/emacs-lisp/comp-run.el
index 3c7802c2ee0..b4f8b46b93a 100644
--- a/lisp/emacs-lisp/comp-run.el
+++ b/lisp/emacs-lisp/comp-run.el
@@ -370,8 +370,8 @@ Return the trampoline if found or nil otherwise."
(memq subr-name native-comp-never-optimize-functions)
(gethash subr-name comp-installed-trampolines-h))
(cl-assert (subr-primitive-p subr))
- (when-let ((trampoline (or (comp--trampoline-search subr-name)
- (comp-trampoline-compile subr-name))))
+ (when-let* ((trampoline (or (comp--trampoline-search subr-name)
+ (comp-trampoline-compile subr-name))))
(comp--install-trampoline subr-name trampoline)))))
;;;###autoload
@@ -423,7 +423,7 @@ bytecode definition was not changed in the meantime)."
(t (signal 'native-compiler-error
(list "Not a file nor directory" file-or-dir)))))
(dolist (file file-list)
- (if-let ((entry (seq-find (lambda (x) (string= file (car x))) comp-files-queue)))
+ (if-let* ((entry (seq-find (lambda (x) (string= file (car x))) comp-files-queue)))
;; Most likely the byte-compiler has requested a deferred
;; compilation, so update `comp-files-queue' to reflect that.
(unless (or (null load)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 96341b0a39f..da351e99d91 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -201,9 +201,9 @@ Useful to hook into pass checkers.")
"Given FUNCTION return the corresponding `comp-constraint'."
(when (symbolp function)
(or (gethash function comp-primitive-func-cstr-h)
- (when-let ((type (or (when-let ((f (comp--symbol-func-to-fun function)))
- (comp-func-declared-type f))
- (function-get function 'function-type))))
+ (when-let* ((type (or (when-let* ((f (comp--symbol-func-to-fun function)))
+ (comp-func-declared-type f))
+ (function-get function 'function-type))))
(comp-type-spec-to-cstr type)))))
;; Keep it in sync with the `cl-deftype-satisfies' property set in
@@ -617,7 +617,7 @@ In use by the back-end."
(defun comp--function-pure-p (f)
"Return t if F is pure."
(or (get f 'pure)
- (when-let ((func (comp--symbol-func-to-fun f)))
+ (when-let* ((func (comp--symbol-func-to-fun f)))
(comp-func-pure func))))
(defun comp--alloc-class-to-container (alloc-class)
@@ -819,7 +819,7 @@ clashes."
(defun comp--intern-func-in-ctxt (_ obj)
"Given OBJ of type `byte-to-native-lambda', create a function in `comp-ctxt'."
- (when-let ((byte-func (byte-to-native-lambda-byte-func obj)))
+ (when-let* ((byte-func (byte-to-native-lambda-byte-func obj)))
(let* ((lap (byte-to-native-lambda-lap obj))
(top-l-form (cl-loop
for form in (comp-ctxt-top-level-forms comp-ctxt)
@@ -1705,7 +1705,7 @@ into the C code forwarding the compilation unit."
;; FIXME Actually we could have another hash for this.
(cl-flet ((pred (bb)
(equal (comp-block-lap-addr bb) addr)))
- (if-let ((pending (cl-find-if #'pred
+ (if-let* ((pending (cl-find-if #'pred
(comp-limplify-pending-blocks comp-pass))))
(comp-block-name pending)
(cl-loop for bb being the hash-value in (comp-func-blocks comp-func)
@@ -1882,9 +1882,9 @@ The assume is emitted at the beginning of the block BB."
rhs)))
(comp-block-insns bb))))
((pred comp--arithm-cmp-fun-p)
- (when-let ((kind (if negated
- (comp--negate-arithm-cmp-fun kind)
- kind)))
+ (when-let* ((kind (if negated
+ (comp--negate-arithm-cmp-fun kind)
+ kind)))
(push `(assume ,(make--comp-mvar :slot lhs-slot)
(,kind ,lhs
,(if-let* ((vld (comp-cstr-imm-vld-p rhs))
@@ -1900,10 +1900,10 @@ The assume is emitted at the beginning of the block BB."
(defun comp--maybe-add-vmvar (op cmp-res insns-seq)
"If CMP-RES is clobbering OP emit a new constrained mvar and return it.
Return OP otherwise."
- (if-let ((match (eql (comp-mvar-slot op) (comp-mvar-slot cmp-res)))
- (new-mvar (make--comp-mvar
- :slot
- (- (cl-incf (comp-func-vframe-size comp-func))))))
+ (if-let* ((match (eql (comp-mvar-slot op) (comp-mvar-slot cmp-res)))
+ (new-mvar (make--comp-mvar
+ :slot
+ (- (cl-incf (comp-func-vframe-size comp-func))))))
(progn
(push `(assume ,new-mvar ,op) (cdr insns-seq))
new-mvar)
@@ -2139,14 +2139,14 @@ TARGET-BB-SYM is the symbol name of the target block."
for bb being each hash-value of (comp-func-blocks comp-func)
do
(comp--loop-insn-in-block bb
- (when-let ((match
- (pcase insn
- (`(set ,lhs (,(pred comp--call-op-p) ,f . ,args))
- (when-let ((cstr-f (comp--get-function-cstr f)))
- (cl-values f cstr-f lhs args)))
- (`(,(pred comp--call-op-p) ,f . ,args)
- (when-let ((cstr-f (comp--get-function-cstr f)))
- (cl-values f cstr-f nil args))))))
+ (when-let* ((match
+ (pcase insn
+ (`(set ,lhs (,(pred comp--call-op-p) ,f . ,args))
+ (when-let* ((cstr-f (comp--get-function-cstr f)))
+ (cl-values f cstr-f lhs args)))
+ (`(,(pred comp--call-op-p) ,f . ,args)
+ (when-let* ((cstr-f (comp--get-function-cstr f)))
+ (cl-values f cstr-f nil args))))))
(cl-multiple-value-bind (f cstr-f lhs args) match
(cl-loop
with gen = (comp--lambda-list-gen (comp-cstr-f-args cstr-f))
@@ -2340,14 +2340,14 @@ blocks."
finger2 (comp-block-post-num b2))))
b1))
(first-processed (l)
- (if-let ((p (cl-find-if #'comp-block-idom l)))
+ (if-let* ((p (cl-find-if #'comp-block-idom l)))
p
(signal 'native-ice '("can't find first preprocessed")))))
- (when-let ((blocks (comp-func-blocks comp-func))
- (entry (gethash 'entry blocks))
- ;; No point to go on if the only bb is 'entry'.
- (bb0 (gethash 'bb_0 blocks)))
+ (when-let* ((blocks (comp-func-blocks comp-func))
+ (entry (gethash 'entry blocks))
+ ;; No point to go on if the only bb is 'entry'.
+ (bb0 (gethash 'bb_0 blocks)))
(cl-loop
with rev-bb-list = (comp--collect-rev-post-order entry)
with changed = t
@@ -2450,7 +2450,7 @@ blocks."
PRE-LAMBDA and POST-LAMBDA are called in pre or post-order if non-nil."
(when pre-lambda
(funcall pre-lambda bb))
- (when-let ((out-edges (comp-block-out-edges bb)))
+ (when-let* ((out-edges (comp-block-out-edges bb)))
(cl-loop for ed in out-edges
for child = (comp-edge-dst ed)
when (eq bb (comp-block-idom child))
@@ -2508,7 +2508,7 @@ PRE-LAMBDA and POST-LAMBDA are called in pre or post-order if non-nil."
do (comp--ssa-rename-insn insn in-frame))
(setf (comp-block-final-frame bb)
(copy-sequence in-frame))
- (when-let ((out-edges (comp-block-out-edges bb)))
+ (when-let* ((out-edges (comp-block-out-edges bb)))
(cl-loop
for ed in out-edges
for child = (comp-edge-dst ed)
@@ -2668,7 +2668,7 @@ Return non-nil if the function is folded successfully."
;; should do basic block pruning in order to be sure that this
;; is not dead-code. This is now left to gcc, to be
;; implemented only if we want a reliable diagnostic here.
- (let* ((f (if-let (f-in-ctxt (comp--symbol-func-to-fun f))
+ (let* ((f (if-let* ((f-in-ctxt (comp--symbol-func-to-fun f)))
;; If the function is IN the compilation ctxt
;; and know to be pure.
(comp-func-byte-func f-in-ctxt)
@@ -2685,7 +2685,7 @@ Fold the call in case."
(comp-cstr-imm-vld-p (car args)))
(setf f (comp-cstr-imm (car args))
args (cdr args)))
- (when-let ((cstr-f (comp--get-function-cstr f)))
+ (when-let* ((cstr-f (comp--get-function-cstr f)))
(let ((cstr (comp-cstr-f-ret cstr-f)))
(when (comp-cstr-empty-p cstr)
;; Store it to be rewritten as non local exit.
@@ -2968,14 +2968,14 @@ FUNCTION can be a function-name or byte compiled function."
do (comp--loop-insn-in-block b
(pcase insn
(`(set ,lval (callref funcall ,f . ,rest))
- (when-let ((ok (comp-cstr-imm-vld-p f))
- (new-form (comp--call-optim-form-call
- (comp-cstr-imm f) rest)))
+ (when-let* ((ok (comp-cstr-imm-vld-p f))
+ (new-form (comp--call-optim-form-call
+ (comp-cstr-imm f) rest)))
(setf insn `(set ,lval ,new-form))))
(`(callref funcall ,f . ,rest)
- (when-let ((ok (comp-cstr-imm-vld-p f))
- (new-form (comp--call-optim-form-call
- (comp-cstr-imm f) rest)))
+ (when-let* ((ok (comp-cstr-imm-vld-p f))
+ (new-form (comp--call-optim-form-call
+ (comp-cstr-imm f) rest)))
(setf insn new-form)))))))
(defun comp--call-optim (_)
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index deebe5109bd..b96d2437b8a 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -3922,8 +3922,8 @@ be installed in `emacs-lisp-mode-map'.")
(define-obsolete-variable-alias 'global-edebug-prefix
'edebug-global-prefix "28.1")
(defvar edebug-global-prefix
- (when-let ((binding
- (car (where-is-internal 'Control-X-prefix (list global-map)))))
+ (when-let* ((binding
+ (car (where-is-internal 'Control-X-prefix (list global-map)))))
(concat binding [?X]))
"Prefix key for global edebug commands, available from any buffer.")
@@ -4659,8 +4659,8 @@ instrumentation for, defaulting to all functions."
functions)))))
;; Remove instrumentation.
(dolist (symbol functions)
- (when-let ((unwrapped
- (edebug--unwrap*-symbol-function symbol)))
+ (when-let* ((unwrapped
+ (edebug--unwrap*-symbol-function symbol)))
(edebug--strip-plist symbol)
(defalias symbol unwrapped)))
(message "Removed edebug instrumentation from %s"
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 74f5e21db7d..98d9a2d2f4f 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -769,10 +769,10 @@ dynamically set from ARGS."
(let* ((slot (aref slots i))
(slot-name (eieio-slot-descriptor-name slot))
(initform (cl--slot-descriptor-initform slot)))
- (unless (or (when-let ((initarg
- (car (rassq slot-name
- (eieio--class-initarg-tuples
- this-class)))))
+ (unless (or (when-let* ((initarg
+ (car (rassq slot-name
+ (eieio--class-initarg-tuples
+ this-class)))))
(plist-get initargs initarg))
;; Those slots whose initform is constant already have
;; the right value set in the default-object.
diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el
index cd60f9f457f..8469440c982 100644
--- a/lisp/emacs-lisp/ert-x.el
+++ b/lisp/emacs-lisp/ert-x.el
@@ -395,8 +395,8 @@ variable `ert-resource-directory-format'. Before formatting, the
file name will be trimmed using `string-trim' with arguments
`ert-resource-directory-trim-left-regexp' and
`ert-resource-directory-trim-right-regexp'."
- `(when-let ((testfile ,(or (macroexp-file-name)
- buffer-file-name)))
+ `(when-let* ((testfile ,(or (macroexp-file-name)
+ buffer-file-name)))
(let ((default-directory (file-name-directory testfile)))
(file-truename
(if (file-accessible-directory-p "resources/")
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index fa1b7a60a90..97aa233f6e2 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -328,8 +328,8 @@ DATA is displayed to the user and should state the reason for skipping."
(unless (eql ,value ',default-value)
(list :value ,value))
(unless (eql ,value ',default-value)
- (when-let ((-explainer-
- (ert--get-explainer ',fn-name)))
+ (when-let* ((-explainer-
+ (ert--get-explainer ',fn-name)))
(list :explanation
(apply -explainer- ,args)))))
value)
@@ -1352,10 +1352,10 @@ RESULT must be an `ert-test-result-with-condition'."
(defun ert-test-location (test)
"Return a string description the source location of TEST."
- (when-let ((loc
- (ignore-errors
- (find-function-search-for-symbol
- (ert-test-name test) 'ert-deftest (ert-test-file-name test)))))
+ (when-let* ((loc
+ (ignore-errors
+ (find-function-search-for-symbol
+ (ert-test-name test) 'ert-deftest (ert-test-file-name test)))))
(let* ((buffer (car loc))
(point (cdr loc))
(file (file-relative-name (buffer-file-name buffer)))
@@ -1548,11 +1548,11 @@ test packages depend on each other, it might be helpful.")
"Write a JUnit test report, generated from STATS."
;; https://www.ibm.com/docs/en/developer-for-zos/14.1.0?topic=formats-junit-xml-format
;; https://llg.cubic.org/docs/junit/
- (when-let ((symbol (car (apropos-internal "" #'ert-test-boundp)))
- (test-file (symbol-file symbol 'ert--test))
- (test-report
- (file-name-with-extension
- (or ert-load-file-name test-file) "xml")))
+ (when-let* ((symbol (car (apropos-internal "" #'ert-test-boundp)))
+ (test-file (symbol-file symbol 'ert--test))
+ (test-report
+ (file-name-with-extension
+ (or ert-load-file-name test-file) "xml")))
(with-temp-file test-report
(insert "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n")
(insert (format "<testsuites name=\"%s\" tests=\"%s\" errors=\"%s\" failures=\"%s\" skipped=\"%s\" time=\"%s\">\n"
@@ -2906,10 +2906,10 @@ write erts files."
(setq end-before end-after
start-after start-before))
;; Update persistent specs.
- (when-let ((point-char (assq 'point-char specs)))
+ (when-let* ((point-char (assq 'point-char specs)))
(setq gen-specs
(map-insert gen-specs 'point-char (cdr point-char))))
- (when-let ((code (cdr (assq 'code specs))))
+ (when-let* ((code (cdr (assq 'code specs))))
(setq gen-specs
(map-insert gen-specs 'code (car (read-from-string code)))))
;; Get the "after" strings.
@@ -2917,12 +2917,12 @@ write erts files."
(insert-buffer-substring file-buffer start-after end-after)
(ert--erts-unquote)
;; Remove the newline at the end of the buffer.
- (when-let ((no-newline (cdr (assq 'no-after-newline specs))))
+ (when-let* ((no-newline (cdr (assq 'no-after-newline specs))))
(goto-char (point-min))
(when (re-search-forward "\n\\'" nil t)
(delete-region (match-beginning 0) (match-end 0))))
;; Get the expected "after" point.
- (when-let ((point-char (cdr (assq 'point-char gen-specs))))
+ (when-let* ((point-char (cdr (assq 'point-char gen-specs))))
(goto-char (point-min))
(when (search-forward point-char nil t)
(delete-region (match-beginning 0) (match-end 0))
@@ -2933,13 +2933,13 @@ write erts files."
(insert-buffer-substring file-buffer start-before end-before)
(ert--erts-unquote)
;; Remove the newline at the end of the buffer.
- (when-let ((no-newline (cdr (assq 'no-before-newline specs))))
+ (when-let* ((no-newline (cdr (assq 'no-before-newline specs))))
(goto-char (point-min))
(when (re-search-forward "\n\\'" nil t)
(delete-region (match-beginning 0) (match-end 0))))
(goto-char (point-min))
;; Place point in the specified place.
- (when-let ((point-char (cdr (assq 'point-char gen-specs))))
+ (when-let* ((point-char (cdr (assq 'point-char gen-specs))))
(when (search-forward point-char nil t)
(delete-region (match-beginning 0) (match-end 0))))
(let ((code (cdr (assq 'code gen-specs))))
diff --git a/lisp/emacs-lisp/icons.el b/lisp/emacs-lisp/icons.el
index 847ef53a1cb..144b60a2c1d 100644
--- a/lisp/emacs-lisp/icons.el
+++ b/lisp/emacs-lisp/icons.el
@@ -119,7 +119,7 @@ If OBJECT is an icon, return the icon properties."
(setq spec (icons--copy-spec spec))
;; Let the Customize theme override.
(unless inhibit-theme
- (when-let ((theme-spec (cadr (car (get icon 'theme-icon)))))
+ (when-let* ((theme-spec (cadr (car (get icon 'theme-icon)))))
(setq spec (icons--merge-spec (icons--copy-spec theme-spec) spec))))
;; Inherit from the parent spec (recursively).
(unless inhibit-inheritance
@@ -149,15 +149,15 @@ If OBJECT is an icon, return the icon properties."
;; Go through all the variations in this section
;; and return the first one we can display.
(dolist (icon (icon-spec-values type-spec))
- (when-let ((result
- (icons--create type icon type-keywords)))
+ (when-let* ((result
+ (icons--create type icon type-keywords)))
(throw 'found
- (if-let ((face (plist-get type-keywords :face)))
+ (if-let* ((face (plist-get type-keywords :face)))
(propertize result 'face face)
result)))))))))
(unless icon-string
(error "Couldn't find any way to display the %s icon" name))
- (when-let ((help (plist-get keywords :help-echo)))
+ (when-let* ((help (plist-get keywords :help-echo)))
(setq icon-string (propertize icon-string 'help-echo help)))
(propertize icon-string 'rear-nonsticky t)))))
@@ -200,18 +200,18 @@ present if the icon is represented by an image."
" " 'display
(let ((props
(append
- (if-let ((height (plist-get keywords :height)))
+ (if-let* ((height (plist-get keywords :height)))
(list :height (if (eq height 'line)
(window-default-line-height)
height)))
- (if-let ((width (plist-get keywords :width)))
+ (if-let* ((width (plist-get keywords :width)))
(list :width (if (eq width 'font)
(default-font-width)
width)))
'(:scale 1)
- (if-let ((rotation (plist-get keywords :rotation)))
+ (if-let* ((rotation (plist-get keywords :rotation)))
(list :rotation rotation))
- (if-let ((margin (plist-get keywords :margin)))
+ (if-let* ((margin (plist-get keywords :margin)))
(list :margin margin))
(list :ascent (if (plist-member keywords :ascent)
(plist-get keywords :ascent)
@@ -219,10 +219,10 @@ present if the icon is represented by an image."
(apply 'create-image file nil nil props))))))
(cl-defmethod icons--create ((_type (eql 'emoji)) icon _keywords)
- (when-let ((font (and (display-multi-font-p)
- ;; FIXME: This is not enough for ensuring
- ;; display of color Emoji.
- (car (internal-char-font nil ?🟠)))))
+ (when-let* ((font (and (display-multi-font-p)
+ ;; FIXME: This is not enough for ensuring
+ ;; display of color Emoji.
+ (car (internal-char-font nil ?🟠)))))
(and (font-has-char-p font (aref icon 0))
icon)))
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 601cc7bf712..220bb5175ea 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -1153,7 +1153,7 @@ is the buffer position of the start of the containing expression."
(defun lisp--local-defform-body-p (state)
"Return non-nil when at local definition body according to STATE.
STATE is the `parse-partial-sexp' state for current position."
- (when-let ((start-of-innermost-containing-list (nth 1 state)))
+ (when-let* ((start-of-innermost-containing-list (nth 1 state)))
(let* ((parents (nth 9 state))
(first-cons-after (cdr parents))
(second-cons-after (cdr first-cons-after))
@@ -1171,11 +1171,11 @@ STATE is the `parse-partial-sexp' state for current position."
(let (local-definitions-starting-point)
(and (save-excursion
(goto-char (1+ second-order-parent))
- (when-let ((head (ignore-errors
- ;; FIXME: This does not distinguish
- ;; between reading nil and a read error.
- ;; We don't care but still, better fix this.
- (read (current-buffer)))))
+ (when-let* ((head (ignore-errors
+ ;; FIXME: This does not distinguish
+ ;; between reading nil and a read error.
+ ;; We don't care but still, better fix this.
+ (read (current-buffer)))))
(when (memq head '( cl-flet cl-labels cl-macrolet cl-flet*
cl-symbol-macrolet))
;; In what follows, we rely on (point) returning non-nil.
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index 50e90cdf94c..1ac7aecdb66 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -295,7 +295,7 @@ expression, in which case we want to handle forms differently."
(null (plist-get props :set))
(error nil)))
;; Propagate the :safe property to the loaddefs file.
- ,@(when-let ((safe (plist-get props :safe)))
+ ,@(when-let* ((safe (plist-get props :safe)))
`((put ',varname 'safe-local-variable ,safe))))))
;; Extract theme properties.
@@ -413,8 +413,8 @@ don't include."
(save-excursion
;; Since we're "open-coding", we have to repeat more
;; complicated logic in `hack-local-variables'.
- (when-let ((beg
- (re-search-forward "read-symbol-shorthands: *" nil t)))
+ (when-let* ((beg
+ (re-search-forward "read-symbol-shorthands: *" nil t)))
;; `read-symbol-shorthands' alist ends with two parens.
(let* ((end (re-search-forward ")[;\n\s]*)"))
(commentless (replace-regexp-in-string
@@ -499,7 +499,7 @@ don't include."
(when (and autoload-compute-prefixes
compute-prefixes)
(with-demoted-errors "%S"
- (when-let
+ (when-let*
((form (loaddefs-generate--compute-prefixes load-name)))
;; This output needs to always go in the main loaddefs.el,
;; regardless of `generated-autoload-file'.
diff --git a/lisp/emacs-lisp/multisession.el b/lisp/emacs-lisp/multisession.el
index c923c29bbf7..71be928e30f 100644
--- a/lisp/emacs-lisp/multisession.el
+++ b/lisp/emacs-lisp/multisession.el
@@ -428,8 +428,8 @@ storage method to list."
(tabulated-list-print t)
(goto-char (point-min))
(when id
- (when-let ((match
- (text-property-search-forward 'tabulated-list-id id t)))
+ (when-let* ((match
+ (text-property-search-forward 'tabulated-list-id id t)))
(goto-char (prop-match-beginning match))))))
(defun multisession-delete-value (id)
@@ -456,7 +456,7 @@ storage method to list."
(let* ((object (or
;; If the multisession variable already exists, use
;; it (so that we update it).
- (if-let (sym (intern-soft (cdr id)))
+ (if-let* ((sym (intern-soft (cdr id))))
(and (boundp sym) (symbol-value sym))
nil)
;; Create a new object.
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index e168096e153..894bc9c8c37 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -247,8 +247,8 @@ This function is meant to be used as a hook for `package-read-archive-hook'."
(car spec)))
(setf (alist-get (intern archive) package-vc--archive-data-alist)
(cdr spec))
- (when-let ((default-vc (plist-get (cdr spec) :default-vc))
- ((not (memq default-vc vc-handled-backends))))
+ (when-let* ((default-vc (plist-get (cdr spec) :default-vc))
+ ((not (memq default-vc vc-handled-backends))))
(warn "Archive `%S' expects missing VC backend %S"
archive (plist-get (cdr spec) :default-vc)))))))))
@@ -279,7 +279,7 @@ asynchronously."
(defun package-vc--version (pkg)
"Return the version number for the VC package PKG."
(cl-assert (package-vc-p pkg))
- (if-let ((main-file (package-vc--main-file pkg)))
+ (if-let* ((main-file (package-vc--main-file pkg)))
(with-temp-buffer
(insert-file-contents main-file)
(package-strip-rcs-id
@@ -663,7 +663,7 @@ attribute in PKG-SPEC."
;; Check out the latest release if requested
(when (eq rev :last-release)
- (if-let ((release-rev (package-vc--release-rev pkg-desc)))
+ (if-let* ((release-rev (package-vc--release-rev pkg-desc)))
(vc-retrieve-tag dir release-rev)
(message "No release revision was found, continuing...")))))
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 90d6150ed0b..af07ba44e28 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -858,22 +858,22 @@ byte-compilation of the new package to fail."
(cl-remove-if-not #'stringp
(mapcar #'car load-history)))))
(dolist (file files)
- (when-let ((library (package--library-stem
- (file-relative-name file dir)))
- (canonical (locate-library library nil effective-path))
- (truename (file-truename canonical))
- ;; Normally, all files in a package are compiled by
- ;; now, but don't assume that. E.g. different
- ;; versions can add or remove `no-byte-compile'.
- (altname (if (string-suffix-p ".el" truename)
- (replace-regexp-in-string
- "\\.el\\'" ".elc" truename t)
- (replace-regexp-in-string
- "\\.elc\\'" ".el" truename t)))
- (found (or (member truename history)
- (and (not (string= altname truename))
- (member altname history))))
- (recent-index (length found)))
+ (when-let* ((library (package--library-stem
+ (file-relative-name file dir)))
+ (canonical (locate-library library nil effective-path))
+ (truename (file-truename canonical))
+ ;; Normally, all files in a package are compiled by
+ ;; now, but don't assume that. E.g. different
+ ;; versions can add or remove `no-byte-compile'.
+ (altname (if (string-suffix-p ".el" truename)
+ (replace-regexp-in-string
+ "\\.el\\'" ".elc" truename t)
+ (replace-regexp-in-string
+ "\\.elc\\'" ".el" truename t)))
+ (found (or (member truename history)
+ (and (not (string= altname truename))
+ (member altname history))))
+ (recent-index (length found)))
(unless (equal (file-name-base library)
(format "%s-autoloads" (package-desc-name pkg-desc)))
(push (cons (expand-file-name library dir) recent-index) result))))
diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index 12346b3d285..e246e4211bb 100644
--- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
@@ -491,8 +491,8 @@ the bounds of a region containing Lisp code to pretty-print."
(cons (cond
((consp (cdr sexp))
(let ((head (car sexp)))
- (if-let (((null (cddr sexp)))
- (syntax-entry (assq head pp--quoting-syntaxes)))
+ (if-let* (((null (cddr sexp)))
+ (syntax-entry (assq head pp--quoting-syntaxes)))
(progn
(insert (cdr syntax-entry))
(pp--insert-lisp (cadr sexp)))
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index 3b4907b8f43..2427d76734e 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -475,7 +475,7 @@ this defaults to the current buffer."
(t
disp)))
;; Remove any old instances.
- (when-let ((old (assoc prop disp)))
+ (when-let* ((old (assoc prop disp)))
(setq disp (delete old disp)))
(setq disp (cons (list prop value) disp))
(when vector
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index 30397137efb..eaf3c5cb561 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -492,8 +492,8 @@ changing `tabulated-list-sort-key'."
(if groups
(dolist (group groups)
(insert (car group) ?\n)
- (when-let ((saved-pt-new (tabulated-list-print-entries
- (cdr group) sorter update entry-id)))
+ (when-let* ((saved-pt-new (tabulated-list-print-entries
+ (cdr group) sorter update entry-id)))
(setq saved-pt saved-pt-new)))
(setq saved-pt (tabulated-list-print-entries
entries sorter update entry-id)))
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
index f6f2a8d87c0..166755e4dcc 100644
--- a/lisp/emacs-lisp/timer.el
+++ b/lisp/emacs-lisp/timer.el
@@ -407,7 +407,7 @@ This function returns a timer object which you can use in
;; Handle relative times like "2 hours 35 minutes".
(when (stringp time)
- (when-let ((secs (timer-duration time)))
+ (when-let* ((secs (timer-duration time)))
(setq time (timer-relative-time nil secs))))
;; Handle "11:23pm" and the like. Interpret it as meaning today
diff --git a/lisp/emacs-lisp/vtable.el b/lisp/emacs-lisp/vtable.el
index d58c6894c16..925961f012c 100644
--- a/lisp/emacs-lisp/vtable.el
+++ b/lisp/emacs-lisp/vtable.el
@@ -271,7 +271,7 @@ If TABLE is found, return the position of the start of the table.
If it can't be found, return nil and don't move point."
(let ((start (point)))
(goto-char (point-min))
- (if-let ((match (text-property-search-forward 'vtable table t)))
+ (if-let* ((match (text-property-search-forward 'vtable table t)))
(goto-char (prop-match-beginning match))
(goto-char start)
nil)))
@@ -279,7 +279,7 @@ If it can't be found, return nil and don't move point."
(defun vtable-goto-column (column)
"Go to COLUMN on the current line."
(beginning-of-line)
- (if-let ((match (text-property-search-forward 'vtable-column column t)))
+ (if-let* ((match (text-property-search-forward 'vtable-column column t)))
(goto-char (prop-match-beginning match))
(end-of-line)))
@@ -311,10 +311,10 @@ is signaled."
;; FIXME: If the table's buffer has no visible window, or if its
;; width has changed since the table was updated, the cache key will
;; not match and the object can't be updated. (Bug #69837).
- (if-let ((line-number (seq-position (car (vtable--cache table)) old-object
- (lambda (a b)
- (equal (car a) b))))
- (line (elt (car (vtable--cache table)) line-number)))
+ (if-let* ((line-number (seq-position (car (vtable--cache table)) old-object
+ (lambda (a b)
+ (equal (car a) b))))
+ (line (elt (car (vtable--cache table)) line-number)))
(progn
(setcar line object)
(setcdr line (vtable--compute-cached-line table object))
@@ -638,7 +638,7 @@ This also updates the displayed table."
(insert "\n")
(put-text-property start (point) 'vtable-object (car line))
(unless column-colors
- (when-let ((row-colors (slot-value table '-cached-colors)))
+ (when-let* ((row-colors (slot-value table '-cached-colors)))
(add-face-text-property
start (point)
(elt row-colors (mod line-number (length row-colors))))))))
@@ -865,13 +865,13 @@ If NEXT, do the next column."
(nth 1 (elt (cdr elem) index)))
cache)))))
;; Let min-width/max-width specs have their say.
- (when-let ((min-width (and (vtable-column-min-width column)
- (vtable--compute-width
- table (vtable-column-min-width column)))))
+ (when-let* ((min-width (and (vtable-column-min-width column)
+ (vtable--compute-width
+ table (vtable-column-min-width column)))))
(setq width (max width min-width)))
- (when-let ((max-width (and (vtable-column-max-width column)
- (vtable--compute-width
- table (vtable-column-max-width column)))))
+ (when-let* ((max-width (and (vtable-column-max-width column)
+ (vtable--compute-width
+ table (vtable-column-max-width column)))))
(setq width (min width max-width)))
width))
(vtable-columns table))
@@ -904,7 +904,7 @@ If NEXT, do the next column."
(vtable-keymap table))
(copy-keymap vtable-map)
vtable-map)))
- (when-let ((actions (vtable-actions table)))
+ (when-let* ((actions (vtable-actions table)))
(while actions
(funcall (lambda (key binding)
(keymap-set map key
diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 68db33bfa68..b11e1ebeb70 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -285,7 +285,7 @@ entirely by setting `warning-suppress-types' or
(unless buffer-name
(setq buffer-name "*Warnings*"))
(with-suppressed-warnings ((obsolete warning-level-aliases))
- (when-let ((new (cdr (assq level warning-level-aliases))))
+ (when-let* ((new (cdr (assq level warning-level-aliases))))
(warn "Warning level `%s' is obsolete; use `%s' instead" level new)
(setq level new)))
(or (< (warning-numeric-level level)