From ca31697cc95491c19ff257c29bdab3b88d043b09 Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 25 Aug 2026 21:11:27 +0100 Subject: emacs 31 --- attic/elisp/jao-maildir.el | 4 ++-- attic/elisp/jao-notmuch-gnus.el | 16 ++++++++-------- attic/elisp/misc.el | 8 ++++---- attic/elisp/nnnm.el | 16 ++++++++-------- custom/jao-custom-blog.el | 2 +- custom/jao-custom-completion.el | 22 +++++++++++----------- custom/jao-custom-email.el | 6 +++--- custom/jao-custom-eww.el | 10 +++++----- custom/jao-custom-exwm.el | 24 ++++++++++++------------ custom/jao-custom-notmuch.el | 30 ++++++++++++------------------ custom/jao-custom-org.el | 2 +- custom/jao-custom-programming.el | 3 ++- custom/jao-custom-w3m.el | 2 +- custom/jao-custom-x11.el | 10 +++++----- init.el | 4 ++-- lib/doc/jao-doc-session.el | 4 +++- lib/doc/jao-doc-view.el | 12 ++++++------ lib/doc/jao-org-links.el | 2 +- lib/doc/jao-org-notes.el | 6 +++--- lib/doc/jao-pdf.el | 8 ++++---- lib/eos/jao-afio.el | 5 +++-- lib/eos/jao-eshell-here.el | 4 ++-- lib/eos/jao-minibuffer.el | 4 ++-- lib/eos/jao-multisession.el | 6 +++--- lib/eos/jao-notify.el | 4 ++-- lib/eos/jao-r2e.el | 3 ++- lib/eos/jao-tracking.el | 4 ++-- lib/media/jao-lyrics.el | 4 ++-- lib/media/jao-mpc.el | 8 ++++---- lib/media/jao-mpris.el | 8 ++++---- lib/media/jao-random-album.el | 4 ++-- lib/net/jao-eww-session.el | 10 +++++----- lib/net/jao-notmuch-gnus.el | 18 +++++++++--------- lib/net/jao-notmuch.el | 16 ++++++++-------- lib/net/jao-proton-utils.el | 4 ++-- lib/net/randomsig.el | 4 ++-- lib/prog/jao-compilation.el | 8 ++++---- lib/themes/jao-themes.el | 2 +- 38 files changed, 153 insertions(+), 154 deletions(-) diff --git a/attic/elisp/jao-maildir.el b/attic/elisp/jao-maildir.el index 18a1725..3078a95 100644 --- a/attic/elisp/jao-maildir.el +++ b/attic/elisp/jao-maildir.el @@ -90,8 +90,8 @@ 0)) (defun jao-maildir--update-track-string (mbox) - (when-let ((track (seq-find (lambda (td) (string-match-p (car td) mbox)) - jao-maildir--trackers))) + (when-let* ((track (seq-find (lambda (td) (string-match-p (car td) mbox)) + jao-maildir--trackers))) (let* ((label (cadr track)) (other (assoc-delete-all label jao-maildir--track-strings)) (cnt (jao-maildir--tracked-count track))) diff --git a/attic/elisp/jao-notmuch-gnus.el b/attic/elisp/jao-notmuch-gnus.el index 1576964..20defba 100644 --- a/attic/elisp/jao-notmuch-gnus.el +++ b/attic/elisp/jao-notmuch-gnus.el @@ -62,7 +62,7 @@ (defun jao-notmuch-gnus-show-tags () "Display in the echo area the tags of the current message." (interactive) - (when-let (id (jao-notmuch-gnus-message-id)) + (when-let* ((id (jao-notmuch-gnus-message-id))) (message "%s" (string-join (jao-notmuch-gnus-message-tags id) " ")))) (defun jao-notmuch-gnus-toggle-tags (tags &optional id current) @@ -77,7 +77,7 @@ (defun jao-notmuch-gnus-tag-mark () "Remove the new tag for an article when it's marked as seen by Gnus." - (when-let (id (jao-notmuch-gnus-message-id t)) + (when-let* ((id (jao-notmuch-gnus-message-id t))) (jao-notmuch-gnus-tag-message id '("-new") t))) (add-hook 'gnus-mark-article-hook #'jao-notmuch-gnus-tag-mark) @@ -189,12 +189,12 @@ Example: (org-gnus-follow-link group id))) (defun jao-notmuch-gnus-org-store () - (when-let (d (or (when (derived-mode-p 'notmuch-show-mode 'notmuch-tree-mode) - (cons (notmuch-show-get-message-id) - (notmuch-show-get-subject))) - (when (derived-mode-p 'gnus-summary-mode 'gnus-article-mode) - (cons (jao-notmuch-gnus-message-id) - (gnus-summary-article-subject))))) + (when-let* ((d (or (when (derived-mode-p 'notmuch-show-mode 'notmuch-tree-mode) + (cons (notmuch-show-get-message-id) + (notmuch-show-get-subject))) + (when (derived-mode-p 'gnus-summary-mode 'gnus-article-mode) + (cons (jao-notmuch-gnus-message-id) + (gnus-summary-article-subject)))))) (org-link-store-props :type "mail" :link (concat "mail:" (car d)) :description (concat "Mail: " (cdr d))))) diff --git a/attic/elisp/misc.el b/attic/elisp/misc.el index 8fe9bfd..c2a6bd3 100644 --- a/attic/elisp/misc.el +++ b/attic/elisp/misc.el @@ -600,7 +600,7 @@ ;;; eldoc for magit status/log buffers (defun jao-magit-eldoc-for-commit (_callback) - (when-let ((commit (magit-commit-at-point))) + (when-let* ((commit (magit-commit-at-point))) (with-temp-buffer (magit-git-insert "show" "--format=format:%an <%ae>, %ar" @@ -903,7 +903,7 @@ (res (funcall fn))) (while (and res tags) (setq res (seq-intersection res (funcall fn)))) (unless res (user-error "No notes found")) - (when-let (f (completing-read "Select file: " (mapcar #'car res))) + (when-let* ((f (completing-read "Select file: " (mapcar #'car res)))) (find-file (cadr (assoc f res)))))) (defun jao-sway-run-or-focus-tidal () @@ -1263,8 +1263,8 @@ It should be the title of the web page as returned by `rdrview'" :config (defun jao-ement-track (event room session) (when (ement-notify--room-unread-p event room session) - (when-let ((n (ement-room--buffer-name room)) - (b (get-buffer n))) + (when-let* ((n (ement-room--buffer-name room)) + (b (get-buffer n))) (tracking-add-buffer b)))) (add-hook 'ement-event-hook #'jao-ement-track) diff --git a/attic/elisp/nnnm.el b/attic/elisp/nnnm.el index 552e95c..561c09e 100644 --- a/attic/elisp/nnnm.el +++ b/attic/elisp/nnnm.el @@ -1,6 +1,6 @@ ;;; nnnm.el --- Gnus backend for notmuch -*- lexical-binding: t; -*- -;; Copyright (C) 2021 jao +;; Copyright (C) 2021, 2026 jao ;; Author: jao ;; Keywords: mail @@ -47,8 +47,8 @@ (defun nnnm--find-query (name) - (when-let (s (seq-find (lambda (s) (string= (plist-get s :name) name)) - nnnm-saved-searches)) + (when-let* ((s (seq-find (lambda (s) (string= (plist-get s :name) name)) + nnnm-saved-searches))) (plist-get s :query))) (defun nnnm--find-message-file (id) @@ -60,11 +60,11 @@ (defun nnnm--article-data (article group) (cond ((stringp article) (list article)) ((numberp article) - (when-let (data (nnnm--group-data group)) + (when-let* ((data (nnnm--group-data group))) (elt data (1- article)))))) (defun nnnm-article-to-file (article group) - (when-let (d (nnnm--article-data article group)) + (when-let* ((d (nnnm--article-data article group))) (or (cadr d) (nnnm--find-message-file (car d))))) (defun nnnm--count (query &optional context) @@ -117,7 +117,7 @@ (gnus-set-active (nnnm--prefixed group server) (cons 1 n))) (defun nnnm--update-group-data (group &optional server) - (when-let (query (nnnm--find-query group)) + (when-let* ((query (nnnm--find-query group))) (let* ((data (or (nnnm--group-data group) (mapcar #'list (nnnm--search query "NOT tag:new")))) (ids (nnnm--search query "tag:new")) @@ -158,7 +158,7 @@ (with-current-buffer nntp-server-buffer (erase-buffer) (dolist (s nnnm-saved-searches) - (when-let (query (plist-get s :query)) + (when-let* ((query (plist-get s :query))) (let ((name (plist-get s :name)) (total (nnnm--count query))) (insert (format "%s %d 1 y\n" name total)))))) @@ -173,7 +173,7 @@ (if (stringp (car sequence)) 'headers (dolist (article sequence) - (when-let (file (nnnm-article-to-file article group)) + (when-let* ((file (nnnm-article-to-file article group))) (insert (format "221 %d Article retrieved.\n" article)) (save-excursion (nnheader-insert-head file)) (if (re-search-forward "\n\r?\n" nil t) diff --git a/custom/jao-custom-blog.el b/custom/jao-custom-blog.el index 7515440..c404d79 100644 --- a/custom/jao-custom-blog.el +++ b/custom/jao-custom-blog.el @@ -169,7 +169,7 @@ (to (expand-file-name (file-name-nondirectory from) org-static-blog-posts-directory))) (rename-file from to) - (when-let ((b (get-buffer from))) + (when-let* ((b (get-buffer from))) (kill-buffer b)) (find-file to) (jao-org-static-blog-update-date) diff --git a/custom/jao-custom-completion.el b/custom/jao-custom-completion.el index 629ed53..6317165 100644 --- a/custom/jao-custom-completion.el +++ b/custom/jao-custom-completion.el @@ -186,9 +186,9 @@ (defvar jao-consult-narrow nil) (defun jao-consult-initial-narrow () - (when-let (c (cond ((eq this-command #'consult-buffer) - (cdr (assoc (jao-afio-frame-name) jao-consult-narrow))) - ((eq this-command #'consult-mode-command) ?m))) + (when-let* ((c (cond ((eq this-command #'consult-buffer) + (cdr (assoc (jao-afio-frame-name) jao-consult-narrow))) + ((eq this-command #'consult-mode-command) ?m)))) (setq unread-command-events (append unread-command-events `(,c 32))))) (add-hook 'minibuffer-setup-hook #'jao-consult-initial-narrow) @@ -301,12 +301,12 @@ (defun jao-embark-targets--w3m-anchor () (when (not (region-active-p)) - (when-let ((url (or (jao-url-around-point) - (thing-at-point 'url) - (and (derived-mode-p 'w3m-mode) - (or (w3m-anchor) w3m-current-url)) - (and (derived-mode-p 'eww-mode) - (eww-current-url))))) + (when-let* ((url (or (jao-url-around-point) + (thing-at-point 'url) + (and (derived-mode-p 'w3m-mode) + (or (w3m-anchor) w3m-current-url)) + (and (derived-mode-p 'eww-mode) + (eww-current-url))))) (when (string-match-p "^https?.*" url) (cons 'url url))))) @@ -406,12 +406,12 @@ (with-eval-after-load "notmuch" (defun jao-link-hint--notmuch-next-part (&optional bound) - (when-let (p (next-single-property-change (point) :notmuch-part nil bound)) + (when-let* ((p (next-single-property-change (point) :notmuch-part nil bound))) (and (< p (or bound (point-max))) p))) (defun jao-link-hint--notmuch-part-p () (and (get-text-property (point) :notmuch-part) - (when-let (b (button-at (point))) (button-label b)))) + (when-let* ((b (button-at (point)))) (button-label b)))) (link-hint-define-type 'notmuch-part :next #'jao-link-hint--notmuch-next-part diff --git a/custom/jao-custom-email.el b/custom/jao-custom-email.el index d7dfafb..e92a17b 100644 --- a/custom/jao-custom-email.el +++ b/custom/jao-custom-email.el @@ -65,8 +65,8 @@ (defun jao-message-insert-bcc () (when jao-notmuch-enabled (let ((f (or (message-fetch-field "From") ""))) - (when-let (b (seq-some (lambda (x) (when (string-match-p (car x) f) (cdr x))) - jao-message--bcc-alist)) + (when-let* ((b (seq-some (lambda (x) (when (string-match-p (car x) f) (cdr x))) + jao-message--bcc-alist))) (insert "Bcc: " b "\n"))))) ;; (when jao-notmuch-enabled @@ -166,7 +166,7 @@ (save-excursion (save-restriction (message-narrow-to-headers) - (when-let ((to (message-fetch-field "To"))) + (when-let* ((to (message-fetch-field "To"))) (when (string-match-p jao-mails-regexp to) (unless (y-or-n-p "Message is addressed to yourself. Continue?") (error "Message not sent"))))))) diff --git a/custom/jao-custom-eww.el b/custom/jao-custom-eww.el index 6f64cd3..a71d704 100644 --- a/custom/jao-custom-eww.el +++ b/custom/jao-custom-eww.el @@ -37,7 +37,7 @@ ;;; opening URLs (defun jao-eww-copy-link () (interactive) - (when-let (lnk (or (car (eww-links-at-point)) (eww-current-url))) + (when-let* ((lnk (or (car (eww-links-at-point)) (eww-current-url)))) (message "%s" lnk) (kill-new lnk))) @@ -88,7 +88,7 @@ ;;; images (defun jao-eww-next-image () (interactive nil eww-mode) - (when-let (p (text-property-search-forward 'image-displayer nil nil t)) + (when-let* ((p (text-property-search-forward 'image-displayer nil nil t))) (goto-char (prop-match-beginning p)))) ;;; close page and reopen @@ -96,7 +96,7 @@ (defun jao-eww-close () (interactive nil eww-mode) - (when-let (current (eww-current-url)) + (when-let* ((current (eww-current-url))) (add-to-list 'jao-eww--closed-urls current)) (let ((nxt (car (jao-eww-session-invisible-buffers)))) (kill-current-buffer) @@ -198,8 +198,8 @@ (with-eval-after-load "org" (require 'ol-eww nil t)) (defun jao-eww-buffer-name () - (when-let ((s (or (plist-get eww-data :title) - (plist-get eww-data :url)))) + (when-let* ((s (or (plist-get eww-data :title) + (plist-get eww-data :url)))) (when (not (string-blank-p s)) (format "%s" s)))) (setq eww-auto-rename-buffer #'jao-eww-buffer-name) diff --git a/custom/jao-custom-exwm.el b/custom/jao-custom-exwm.el index 5e4a354..3494044 100644 --- a/custom/jao-custom-exwm.el +++ b/custom/jao-custom-exwm.el @@ -185,7 +185,7 @@ (when cln (if (jao-exwm--check-name cln) (current-buffer) - (when-let ((b (jao-exwm-find-class-buffer cln))) + (when-let* ((b (jao-exwm-find-class-buffer cln))) (pop-to-buffer b))))) (defun jao-exwm-switch-to-next-class () @@ -343,21 +343,21 @@ (defun jao-exwm-zathura-goto-org (&optional arg) (interactive "P") - (when-let ((info (jao-zathura--file-info (current-buffer)))) - (when-let ((file (jao-org-find-for-pdf (car info)))) - (let ((newp (not (file-exists-p file)))) - (when (or arg newp) (org-store-link nil t)) - (find-file-other-window file) - (when newp - (jao-org-insert-doc-skeleton) - (org-insert-link)))))) + (when-let* ((info (jao-zathura--file-info (current-buffer))) + (file (jao-org-find-for-pdf (car info)))) + (let ((newp (not (file-exists-p file)))) + (when (or arg newp) (org-store-link nil t)) + (find-file-other-window file) + (when newp + (jao-org-insert-doc-skeleton) + (org-insert-link))))) (defun jao-exwm-zathura-goto-org* () (interactive) (jao-exwm-zathura-goto-org t)) (defun jao-exwm-org-store-zathura-link () - (when-let ((info (jao-zathura--file-info (current-buffer)))) + (when-let* ((info (jao-zathura--file-info (current-buffer)))) (let* ((file-name (car info)) (page (cadr info)) (desc (jao-pdf-section-title page file-name))) @@ -387,7 +387,7 @@ (interactive) (if jao-pdf-open-in-emacs (jao-org-goto-pdf) - (when-let (pdf (jao-exwm-org-to-pdf-file)) + (when-let* ((pdf (jao-exwm-org-to-pdf-file))) (jao-zathura-open-doc pdf)))) (with-eval-after-load "org" @@ -424,7 +424,7 @@ (defun jao-exwm-kill-firefox-url () (interactive) - (when-let (b (jao-exwm-find-class-buffer "Firefox")) + (when-let* ((b (jao-exwm-find-class-buffer "Firefox"))) (let ((cb (current-buffer))) (switch-to-buffer b) (jao-exwm--send-str "yy") diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el index f7996ac..c2f6a85 100644 --- a/custom/jao-custom-notmuch.el +++ b/custom/jao-custom-notmuch.el @@ -16,18 +16,18 @@ (:name "l" :query "tag:new and tag:local") (:name "f" :query "tag:new and tag:feeds and not tag:\"/emacs/\""))) -(defsubst jao-notmuch--qstr (c) - (format "%s%s" (plist-get c :name) (plist-get c :count))) - (defvar jao-notmuch-mac-mail-badge nil "Name of Mac mail app showing, besides emacs") (defvar jao-notmuch-mac-hammerspoon (jao-is-darwin)) (defun jao-notmuch-hammerspoon () (jao-when-darwin - (let* ((s (substring-no-properties jao-notmuch-minibuffer-string)) - (s (string-replace " " "%20" s))) - (jao-mac-open "-g hammerspoon://menu?message=%s" s)))) + (let ((s (substring-no-properties jao-notmuch-minibuffer-string))) + (jao-mac-open "-g hammerspoon://menu?message=%s" (url-hexify-string s))))) + +(defun jao-notmuch--qstr (c) + (propertize (format "%s%s" (plist-get c :name) (plist-get c :count)) + 'face (or (plist-get c :face) 'jao-themes-dimm))) (defun jao-notmuch-notify () (interactive) @@ -36,14 +36,8 @@ (when jao-notmuch-mac-mail-badge (jao-mac-app-badge jao-notmuch-mac-mail-badge)) 0)) - (cnts (if (> (or mc 0) 0) (cons `(:name "" :count ,mc) cnts) cnts))) - (setq jao-notmuch-minibuffer-string - (mapconcat (lambda (c) - (propertize (jao-notmuch--qstr c) - 'face - (or (plist-get c :face) 'jao-themes-dimm))) - cnts - " ")) + (cnts (if mc (cons `(:name "" :count ,(format "[%s]" mc)) cnts) cnts))) + (setq jao-notmuch-minibuffer-string (mapconcat #'jao-notmuch--qstr cnts " ")) (when jao-notmuch-mac-hammerspoon (jao-notmuch-hammerspoon)) (jao-minibuffer-refresh))) @@ -91,7 +85,7 @@ (defun jao-notmuch-tree-widen-search () (interactive) - (when-let ((query (notmuch-tree-get-query))) + (when-let* ((query (notmuch-tree-get-query))) (let ((notmuch-show-process-crypto (notmuch-tree--message-process-crypto))) (notmuch-tree-close-message-window) (notmuch-tree (string-replace jao-notmuch--newa "" query))))) @@ -105,7 +99,7 @@ (mapcar (lambda (s) (jao-notmuch--widen s extra)) searches)) (defun jao-notmuch-hello--insert-searches (searches title) - (when-let (searches (notmuch-hello-query-counts searches)) + (when-let* ((searches (notmuch-hello-query-counts searches))) (let* ((cnt (when title (seq-reduce (lambda (c q) (+ c (or (plist-get q :count) 0))) @@ -414,7 +408,7 @@ (if (not (search-forward "Enclosure:" nil t)) (user-error "No enclosure in message body") (re-search-forward "https?://" nil t) - (if-let (url (thing-at-point-url-at-point)) + (if-let* ((url (thing-at-point-url-at-point))) (progn (message "%s %s ..." (if add "Adding" "Playing") url) (unless add (jao-mpc-clear)) @@ -433,7 +427,7 @@ "Planet Scheme: "))) (defun jao-mail-clean-address (args) - (when-let ((address (car args))) + (when-let* ((address (car args))) (list (thread-last (replace-regexp-in-string jao-mail-clean-rx "" address) (replace-regexp-in-string " " ", "))))) diff --git a/custom/jao-custom-org.el b/custom/jao-custom-org.el index 98d49f0..582ade3 100644 --- a/custom/jao-custom-org.el +++ b/custom/jao-custom-org.el @@ -317,7 +317,7 @@ (defun jao-insert-eww-link () "Look for last eww buffer and insert an org link to it." (interactive) - (when-let (b (car (jao-eww-session-eww-buffers))) + (when-let* ((b (car (jao-eww-session-eww-buffers)))) (let ((lnk (with-current-buffer b (format "[[%s][%s]]" (eww-current-url) diff --git a/custom/jao-custom-programming.el b/custom/jao-custom-programming.el index aed4d29..7677177 100644 --- a/custom/jao-custom-programming.el +++ b/custom/jao-custom-programming.el @@ -15,7 +15,7 @@ "Toggle eldoc's documentation buffer." (interactive) (let ((buffer (eldoc-doc-buffer))) - (if-let (w (and buffer (get-buffer-window buffer))) + (if-let* ((w (and buffer (get-buffer-window buffer)))) (delete-window w) (eldoc-doc-buffer t)))) @@ -59,6 +59,7 @@ :init ;; (setq eglot-ignored-server-capabilites '(:inlayHintProvider)) (defun jao-eglot-managed-mode-hook () (eglot-inlay-hints-mode -1) + (eglot-semantic-tokens-mode -1) (setq-local eldoc-display-functions '(eldoc-display-in-buffer))) (setq eglot-events-buffer-config '(:size 1000 :format full) eglot-autoshutdown t) diff --git a/custom/jao-custom-w3m.el b/custom/jao-custom-w3m.el index f532e8b..82246e9 100644 --- a/custom/jao-custom-w3m.el +++ b/custom/jao-custom-w3m.el @@ -6,7 +6,7 @@ (fn `(lambda (b) (with-current-buffer b (string= ,url (w3m-canonicalize-url w3m-current-url)))))) - (when-let (b (seq-find fn (w3m-list-buffers))) + (when-let* ((b (seq-find fn (w3m-list-buffers)))) (pop-to-buffer b)))) (defun jao-w3m-browse-url (url &rest r) diff --git a/custom/jao-custom-x11.el b/custom/jao-custom-x11.el index 3311668..6f0a607 100644 --- a/custom/jao-custom-x11.el +++ b/custom/jao-custom-x11.el @@ -79,11 +79,11 @@ (defun jao-set-wallpaper (&optional path) (interactive) (let ((current (format "~/.wallpaper.%s" (jao-colors-scheme)))) - (when-let ((f (or (and path (expand-file-name path)) - (read-file-name "Image: " - jao-wallpaper-dir - (file-symlink-p current) - t)))) + (when-let* ((f (or (and path (expand-file-name path)) + (read-file-name "Image: " + jao-wallpaper-dir + (file-symlink-p current) + t)))) (make-symbolic-link f current t) (cond (jao-river-enabled (jao-river-set-wallpaper f)) (jao-sway-enabled (jao-sway-set-wallpaper f)) diff --git a/init.el b/init.el index 096a107..43ece5d 100644 --- a/init.el +++ b/init.el @@ -1853,7 +1853,7 @@ (defun jao-mastodon-toot-url () (interactive) - (when-let (url (jao-url-around-point t)) + (when-let* ((url (jao-url-around-point t))) (jao-tracking-go-to-chats) (mastodon-toot--compose-buffer nil nil nil url))) @@ -2098,7 +2098,7 @@ (defun jao-safari-internal-browse () (interactive) - (when-let ((url (jao-safari-current-url))) + (when-let* ((url (jao-safari-current-url))) (jao-browse-url-browse url))) (transient-define-prefix jao-transient-utils () diff --git a/lib/doc/jao-doc-session.el b/lib/doc/jao-doc-session.el index df7e994..31b92c7 100644 --- a/lib/doc/jao-doc-session.el +++ b/lib/doc/jao-doc-session.el @@ -1,6 +1,6 @@ ;;; jao-doc-session.el --- persistent document sessions -*- lexical-binding: t; -*- -;; Copyright (C) 2022, 2024, 2025 jao +;; Copyright (C) 2022, 2024, 2025, 2026 jao ;; Author: jao ;; Keywords: docs @@ -20,6 +20,8 @@ ;;; Code: +(require 'multisession) + (define-multisession-variable jao-doc--session nil) (defun jao-doc-session () (multisession-value jao-doc--session)) diff --git a/lib/doc/jao-doc-view.el b/lib/doc/jao-doc-view.el index fe26c1d..223984a 100644 --- a/lib/doc/jao-doc-view.el +++ b/lib/doc/jao-doc-view.el @@ -1,6 +1,6 @@ ;;; jao-doc-view.el -- extensions for doc-view -*- lexical-binding: t; -*- -;; Copyright (c) 2013, 2015, 2017, 2018, 2019, 2021, 2022 Jose Antonio Ortega Ruiz +;; Copyright (c) 2013, 2015, 2017, 2018, 2019, 2021, 2022, 2026 Jose Antonio Ortega Ruiz ;; This file is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -49,20 +49,20 @@ (defvar-local jao-doc-view--trail-fwd ()) (defun jao-doc-view--trail-push (dest-page) - (when-let (page (jao-doc-view-current-page)) + (when-let* ((page (jao-doc-view-current-page))) (unless (eq (car jao-doc-view--trail-back) page) (push page jao-doc-view--trail-back)))) (defun jao-doc-view-back () (interactive nil doc-view-mode) - (if-let (p (pop jao-doc-view--trail-back)) + (if-let* ((p (pop jao-doc-view--trail-back))) (progn (push (jao-doc-view-current-page) jao-doc-view--trail-fwd) (jao-doc-view-goto-page p)) (message "No more back marks."))) (defun jao-doc-view-forward () (interactive nil doc-view-mode) - (if-let (p (pop jao-doc-view--trail-fwd)) + (if-let* ((p (pop jao-doc-view--trail-fwd))) (progn (push (jao-doc-view-current-page) jao-doc-view--trail-back) (jao-doc-view-goto-page p)) (message "No more forward marks."))) @@ -115,8 +115,8 @@ (cond ((eq 'wait urls) (message "Extracting text, please wait and retry.")) ((zerop (length urls)) (message "No URLs in this %s" (if all "document" "page"))) - (t (when-let (url (completing-read "URL: " urls nil nil - (when (null (cdr urls)) (car urls)))) + (t (when-let* ((url (completing-read "URL: " urls nil nil + (when (null (cdr urls)) (car urls))))) (browse-url url)))))) ;;; . diff --git a/lib/doc/jao-org-links.el b/lib/doc/jao-org-links.el index 95f2d67..8ccd06a 100644 --- a/lib/doc/jao-org-links.el +++ b/lib/doc/jao-org-links.el @@ -127,7 +127,7 @@ ;;;###autoload (defun jao-org-goto-pdf () (interactive) - (if-let (f (jao-org-org-to-pdf-file)) + (if-let* ((f (jao-org-org-to-pdf-file))) (jao-org--pdf-open f nil) (user-error "No PDF file associated with this buffer"))) diff --git a/lib/doc/jao-org-notes.el b/lib/doc/jao-org-notes.el index 4ec0221..fbe3c1f 100644 --- a/lib/doc/jao-org-notes.el +++ b/lib/doc/jao-org-notes.el @@ -163,7 +163,7 @@ Search terms that start with a colon are interpreted as tags, and can appear in any order in the tags list. " (interactive) - (when-let (f (jao-org-notes--consult-rg "Search tags and titles: ")) + (when-let* ((f (jao-org-notes--consult-rg "Search tags and titles: "))) (find-file f))) (defvar jao-org-notes-consult-ripgrep-args @@ -207,7 +207,7 @@ appear in any order in the tags list. (file (completing-read "File: " res nil t nil)) (entry (assoc file res))) (progn (find-file (cadr entry)) - (when-let (line (caddr entry)) (goto-line line))) + (when-let* ((line (caddr entry))) (goto-line line))) (message "Nobody links here!"))) (defun jao-org-notes-insert-tags () @@ -218,7 +218,7 @@ appear in any order in the tags list. (defun jao-org-notes-insert-link () "Select a note file (with completion) and insert a link to it." (interactive) - (when-let (f (jao-org-notes--consult-rg "Notes file: ")) + (when-let* ((f (jao-org-notes--consult-rg "Notes file: "))) (let ((rel-path (file-relative-name f default-directory)) (title (with-current-buffer (find-file-noselect f) (save-excursion diff --git a/lib/doc/jao-pdf.el b/lib/doc/jao-pdf.el index 162cd9a..5d27048 100644 --- a/lib/doc/jao-pdf.el +++ b/lib/doc/jao-pdf.el @@ -145,9 +145,9 @@ (defun jao-open-doc (&optional file page height) (interactive) - (when-let (file (or file - (read-file-name "Document: " - (concat jao-org-dir "/doc/")))) + (when-let* ((file (or file + (read-file-name "Document: " + (concat jao-org-dir "/doc/"))))) (funcall jao-open-doc-fun file page height))) (defun jao-select-pdf () @@ -157,7 +157,7 @@ (defun jao-open-with-zathura () (interactive) - (when-let (f buffer-file-name) + (when-let* ((f buffer-file-name)) (let ((p (jao-doc-view-current-page))) (cond (jao-river-enabled (jao-river-open-with-zathura f p)) (jao-sway-enabled (jao-sway-open-with-zathura f p)) diff --git a/lib/eos/jao-afio.el b/lib/eos/jao-afio.el index 72461dd..525cf60 100644 --- a/lib/eos/jao-afio.el +++ b/lib/eos/jao-afio.el @@ -19,6 +19,7 @@ ;; along with this program. If not, see . ;;; initialisation +(require 'multisession) (require 'cl-lib) (require 'jao-doc-session) @@ -126,7 +127,7 @@ (if (car docs) (progn (switch-to-buffer (car docs)) (switch-to-buffer-other-window (or (cadr docs) (car docs)))) - (when-let (docs (jao-doc-session)) + (when-let* ((docs (jao-doc-session))) (when (y-or-n-p (format "Load saved session? (%d docs)" (length docs))) (jao-afio-open-pdf-session docs)))))) @@ -136,7 +137,7 @@ (declare-function jao-eww-session-load "jao-eww-session") (defun jao-afio--open-eww-session () - (if-let (b (jao-eww-session-eww-buffers)) + (if-let* ((b (jao-eww-session-eww-buffers))) (switch-to-buffer (car b)) (jao-eww-session-load))) diff --git a/lib/eos/jao-eshell-here.el b/lib/eos/jao-eshell-here.el index 54d58f0..870e639 100644 --- a/lib/eos/jao-eshell-here.el +++ b/lib/eos/jao-eshell-here.el @@ -33,8 +33,8 @@ "Value to use for `display-buffer-alist' when displaying the eshell buffer.") (defun jao-eshell-here--find-window (b) - (when-let (w (seq-find (lambda (w) (eq (window-buffer w) b)) - (window-list))) + (when-let* ((w (seq-find (lambda (w) (eq (window-buffer w) b)) + (window-list)))) (select-window w))) (defun jao-eshell-here--frame-buffer (&optional b) diff --git a/lib/eos/jao-minibuffer.el b/lib/eos/jao-minibuffer.el index 552e183..8f8996e 100644 --- a/lib/eos/jao-minibuffer.el +++ b/lib/eos/jao-minibuffer.el @@ -1,6 +1,6 @@ ;;; jao-minibuffer.el --- using the minibuffer to report status -*- lexical-binding: t; -*- -;; Copyright (C) 2020, 2021, 2022, 2024, 2025 jao +;; Copyright (C) 2020, 2021, 2022, 2024, 2025, 2026 jao ;; Author: jao ;; Keywords: extensions @@ -71,7 +71,7 @@ (insert msg))) (defun jao-minibuffer--strip-prev (msg) - (if-let ((n (text-property-any 0 (length msg) 'minibuffer-message t msg))) + (if-let* ((n (text-property-any 0 (length msg) 'minibuffer-message t msg))) (string-trim (substring msg 0 n)) msg)) diff --git a/lib/eos/jao-multisession.el b/lib/eos/jao-multisession.el index 8660611..5583fb6 100644 --- a/lib/eos/jao-multisession.el +++ b/lib/eos/jao-multisession.el @@ -1,6 +1,6 @@ ;;; multisession.el --- Multisession storage for variables -*- lexical-binding: t; -*- -;; Copyright (C) 2021-2025 Free Software Foundation, Inc. +;; Copyright (C) 2021-2026 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -294,8 +294,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) diff --git a/lib/eos/jao-notify.el b/lib/eos/jao-notify.el index 8389b3a..941be36 100644 --- a/lib/eos/jao-notify.el +++ b/lib/eos/jao-notify.el @@ -1,6 +1,6 @@ -;; jao-notify.el -- Interacting with notification daemon +;; jao-notify.el -- Interacting with notification daemon -*- lexical-binding: t; -*- -;; Copyright (c) 2017, 2019, 2020, 2021, 2024, 2025 Jose Antonio Ortega Ruiz +;; Copyright (c) 2017, 2019, 2020, 2021, 2024, 2025, 2026 Jose Antonio Ortega Ruiz ;; Author: Jose Antonio Ortega Ruiz ;; Start date: Sun Jan 08, 2017 20:24 diff --git a/lib/eos/jao-r2e.el b/lib/eos/jao-r2e.el index 568b8bc..81bbed6 100644 --- a/lib/eos/jao-r2e.el +++ b/lib/eos/jao-r2e.el @@ -1,6 +1,6 @@ ;;; jao-r2e.el --- List of rss2email subscriptions -*- lexical-binding: t; -*- -;; Copyright (C) 2025 Jose Antonio Ortega Ruiz +;; Copyright (C) 2025, 2026 Jose Antonio Ortega Ruiz ;; Author: Jose Antonio Ortega Ruiz ;; Keywords: news @@ -18,6 +18,7 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . +(require 'multisession) (require 'jao-url) (autoload 'View-quit "view") diff --git a/lib/eos/jao-tracking.el b/lib/eos/jao-tracking.el index 2af868c..280e9fb 100644 --- a/lib/eos/jao-tracking.el +++ b/lib/eos/jao-tracking.el @@ -1,6 +1,6 @@ ;; jao-minibuffer-tracking.el --- Tracking notifications -*- lexical-binding: t; -*- -;; Copyright (C) 2021, 2022, 2024 jao +;; Copyright (C) 2021, 2022, 2024, 2026 jao ;; Author: jao ;; Keywords: convenience @@ -105,7 +105,7 @@ `(:propertize ,(plist-get s :propertize) face (jao-tracking-minibuffer - ,@(when-let ((f (plist-get s 'face))) + ,@(when-let* ((f (plist-get s 'face))) (jao-tracking-set-log " * ") (list f)))) `(:propertize "|" face jao-tracking-minibuffer-sep))) diff --git a/lib/media/jao-lyrics.el b/lib/media/jao-lyrics.el index 985c9d9..f7b47ca 100644 --- a/lib/media/jao-lyrics.el +++ b/lib/media/jao-lyrics.el @@ -1,6 +1,6 @@ -;; jao-lyrics.el -- simple show lyrics using glyrc +;; jao-lyrics.el -- simple show lyrics using glyrc -*- lexical-binding: t; -*- -;; Copyright (C) 2009, 2010, 2017, 2019, 2020, 2022 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2017, 2019, 2020, 2022, 2026 Jose Antonio Ortega Ruiz ;; Author: Jose Antonio Ortega Ruiz ;; Start date: Sat Jul 04, 2009 13:41 diff --git a/lib/media/jao-mpc.el b/lib/media/jao-mpc.el index 5228787..3c6aa85 100644 --- a/lib/media/jao-mpc.el +++ b/lib/media/jao-mpc.el @@ -1,6 +1,6 @@ ;;; jao-mpc.el --- Using mpc to interact with mpd -*- lexical-binding: t; -*- -;; Copyright (C) 2021, 2022, 2024, 2025 jao +;; Copyright (C) 2021, 2022, 2024, 2025, 2026 jao ;; Author: jao ;; Keywords: convenience @@ -128,7 +128,7 @@ (defvar jao-mpc--idle-procs nil) (defun jao-mpc--idle-loop (&optional port) - (when-let (proc (alist-get port jao-mpc--idle-procs)) + (when-let* ((proc (alist-get port jao-mpc--idle-procs))) (ignore-errors (kill-process proc))) (setf (alist-get port jao-mpc--idle-procs nil t) (make-process :name (format "jao-mpc-idleloop (%s)" port) @@ -151,7 +151,7 @@ (read-only-mode 1)) (defun jao-mpc--album-buffer () - (if-let (b (get-buffer jao-mpc--albums)) + (if-let* ((b (get-buffer jao-mpc--albums))) b (with-current-buffer (get-buffer-create jao-mpc--albums) (jao-mpc-albums-mode) @@ -355,7 +355,7 @@ (jao-mpc--cmd jao-mpc--simple-albums-cmd port) albums-str)) (albums (split-string albums-str "\n" t))) - (when-let (album (completing-read "Play album: " albums nil t)) + (when-let* ((album (completing-read "Play album: " albums nil t))) (jao-mpc--add-and-play (car (split-string album "-" t " ")) port)))) (provide 'jao-mpc) diff --git a/lib/media/jao-mpris.el b/lib/media/jao-mpris.el index 80d0675..7331cf3 100644 --- a/lib/media/jao-mpris.el +++ b/lib/media/jao-mpris.el @@ -1,6 +1,6 @@ ;;; jao-mpris.el --- mpris players control -*- lexical-binding: t; -*- -;; Copyright (C) 2020, 2021, 2022, 2024, 2025 jao +;; Copyright (C) 2020, 2021, 2022, 2024, 2025, 2026 jao ;; Author: jao ;; Keywords: multimedia @@ -97,7 +97,7 @@ jao-mpris--current nil)) (defun jao-mpris--get (k &optional l) - (when-let (v (alist-get k (or l jao-mpris--current))) + (when-let* ((v (alist-get k (or l jao-mpris--current)))) (if (consp v) (car v) v))) (defun jao-mpris--set-current (k v) @@ -159,7 +159,7 @@ (defun jao-mpris--handler (iname properties &rest _args) (let ((inhibit-message t)) (message "Received properties: %S from %s" properties iname) - (when-let (md (caadr (assoc "Metadata" properties))) + (when-let* ((md (caadr (assoc "Metadata" properties)))) (let ((tno (caadr (assoc "xesam:trackNumber" md))) (tlt (caadr (assoc "xesam:title" md))) (art (caadr (assoc "xesam:artist" md))) @@ -170,7 +170,7 @@ (jao-mpris--set-current 'artist art) (jao-mpris--set-current 'album alb) (jao-mpris--set-current 'length len))) - (when-let (st (caadr (assoc "PlaybackStatus" properties))) + (when-let* ((st (caadr (assoc "PlaybackStatus" properties)))) (jao-mpris--set-current 'status st) (when (string= st "Stopped") (dolist (k '(track title artist album length)) diff --git a/lib/media/jao-random-album.el b/lib/media/jao-random-album.el index 3b2915b..f3f758e 100644 --- a/lib/media/jao-random-album.el +++ b/lib/media/jao-random-album.el @@ -1,6 +1,6 @@ -;; jao-random-album.el -- play random albums +;; jao-random-album.el -- play random albums -*- lexical-binding: t; -*- -;; Copyright (C) 2009, 2010, 2017-2019, 2021-2022, 2024 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2017-2019, 2021-2022, 2024, 2026 Jose Antonio Ortega Ruiz ;; Author: Jose Antonio Ortega Ruiz ;; Start date: Sat Jul 04, 2009 13:06 diff --git a/lib/net/jao-eww-session.el b/lib/net/jao-eww-session.el index da5bc8b..3e5e1da 100644 --- a/lib/net/jao-eww-session.el +++ b/lib/net/jao-eww-session.el @@ -1,6 +1,6 @@ ;;; jao-eww-session.el --- Persistent eww sessions -*- lexical-binding: t; -*- -;; Copyright (C) 2003-2004, 2006-2009, 2012, 2021-2022, 2025 Jose A Ortega Ruiz +;; Copyright (C) 2003-2004, 2006-2009, 2012, 2021-2022, 2025, 2026 Jose A Ortega Ruiz ;; Author: Jose A Ortega Ruiz ;; Version: 0.4 @@ -97,7 +97,7 @@ the session is already displayed in a eww tab, jao-eww-session can: (jao-eww-session-eww-buffers (current-buffer)))) (defun jao-eww--current-url () - (when-let (url (eww-current-url)) (url-encode-url url))) + (when-let* ((url (eww-current-url))) (url-encode-url url))) (defun jao-eww-session--current-urls (&optional skip-current) (let ((urls) @@ -107,7 +107,7 @@ the session is already displayed in a eww tab, jao-eww-session can: (dolist (b (jao-eww-session-eww-buffers (when skip-current cb)) (list pos (reverse urls))) (set-buffer b) - (when-let (url (jao-eww--current-url)) + (when-let* ((url (jao-eww--current-url))) (when (eq b cb) (setq pos count)) (setq count (1+ count)) (push (cons url (jao-eww-buffer-title)) urls))))) @@ -133,7 +133,7 @@ the session is already displayed in a eww tab, jao-eww-session can: (seq-filter (lambda (b) (with-current-buffer b - (when-let (url (jao-eww--current-url)) + (when-let* ((url (jao-eww--current-url))) (when (member url urls) (when (y-or-n-p "Already open session, abort? ") (switch-to-buffer b) @@ -217,7 +217,7 @@ the session is already displayed in a eww tab, jao-eww-session can: (defun jao-eww-session-load () "Load last stored session into eww." (interactive) - (when-let ((s (jao-eww-session-load-aux))) + (when-let* ((s (jao-eww-session-load-aux))) (let* ((urls (jao-eww-session-urls s)) (offset (jao-eww-session-offset s)) (buffers (unless (equal jao-eww-session-duplicate-tabs 'always) diff --git a/lib/net/jao-notmuch-gnus.el b/lib/net/jao-notmuch-gnus.el index aa63d7c..9a17841 100644 --- a/lib/net/jao-notmuch-gnus.el +++ b/lib/net/jao-notmuch-gnus.el @@ -1,6 +1,6 @@ ;;; jao-notmuch-gnus.el --- notmuch-gnus interoperability -*- lexical-binding: t; -*- -;; Copyright (C) 2022, 2024, 2025 jao +;; Copyright (C) 2022, 2024, 2025, 2026 jao ;; Author: jao ;; Keywords: mail @@ -62,7 +62,7 @@ (defun jao-notmuch-gnus-show-tags () "Display in the echo area the tags of the current message." (interactive) - (when-let (id (jao-notmuch-gnus-message-id)) + (when-let* ((id (jao-notmuch-gnus-message-id))) (message "%s" (string-join (jao-notmuch-gnus-message-tags id) " ")))) (jao-transient-major-mode+ gnus-summary @@ -82,7 +82,7 @@ (defun jao-notmuch-gnus-tag-mark () "Remove the new and unread tags for an article when it's marked as seen by Gnus." - (when-let (id (jao-notmuch-gnus-message-id t)) + (when-let* ((id (jao-notmuch-gnus-message-id t))) (jao-notmuch-gnus-tag-message id '("-new" "-unread") t))) (add-hook 'gnus-mark-article-hook #'jao-notmuch-gnus-tag-mark) @@ -220,12 +220,12 @@ Example: (org-gnus-follow-link group id))) (defun jao-notmuch-gnus-org-store () - (when-let (d (or (when (derived-mode-p 'notmuch-show-mode 'notmuch-tree-mode) - (cons (notmuch-show-get-message-id) - (notmuch-show-get-subject))) - (when (derived-mode-p 'gnus-summary-mode 'gnus-article-mode) - (cons (jao-notmuch-gnus-message-id) - (gnus-summary-article-subject))))) + (when-let* ((d (or (when (derived-mode-p 'notmuch-show-mode 'notmuch-tree-mode) + (cons (notmuch-show-get-message-id) + (notmuch-show-get-subject))) + (when (derived-mode-p 'gnus-summary-mode 'gnus-article-mode) + (cons (jao-notmuch-gnus-message-id) + (gnus-summary-article-subject)))))) (org-link-store-props :type "mail" :link (concat "mail:" (car d)) :description (concat "Mail: " (cdr d))))) diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el index 0f6903a..625c8e6 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -69,7 +69,7 @@ (user-error "No tree view for this buffer"))) (defun jao-notmuch-tree--looking-at-message () - (when-let (id (plist-get (notmuch-tree-get-message-properties) :id)) + (when-let* ((id (plist-get (notmuch-tree-get-message-properties) :id))) (equal (concat "*notmuch-id:" id "*") (buffer-name (window-buffer notmuch-tree-message-window))))) @@ -105,7 +105,7 @@ (goto-char (point-min)) (let ((pos (point))) (while (setq pos (next-single-property-change pos 'w3m-href-anchor)) - (when-let ((url (get-text-property pos 'w3m-href-anchor))) + (when-let* ((url (get-text-property pos 'w3m-href-anchor))) (when (stringp url) (cl-pushnew url res :test #'string=)))) (seq-uniq res #'string=)))) @@ -117,7 +117,7 @@ (defun jao-notmuch-browse-urls (&optional external) (interactive "P") - (if-let ((urls (jao-notmuch-message-urls))) + (if-let* ((urls (jao-notmuch-message-urls))) (funcall (if external browse-url-secondary-browser-function #'browse-url) (completing-read "Browse URL: " urls)) (message "No URLs in this message"))) @@ -131,22 +131,22 @@ (interactive) (when (get-text-property (point) 'w3m-href-anchor) (goto-char (next-single-property-change (point) 'w3m-href-anchor))) - (if-let (pos (next-single-property-change (point) 'w3m-href-anchor)) + (if-let* ((pos (next-single-property-change (point) 'w3m-href-anchor))) (goto-char pos) (or (forward-button 1 nil t t) (ffap-next-guess)))) (defun jao-notmuch-show-previous-button () (interactive) - (if-let (pos (previous-single-property-change (point) 'w3m-href-anchor)) + (if-let* ((pos (previous-single-property-change (point) 'w3m-href-anchor))) (goto-char (previous-single-property-change pos 'w3m-href-anchor)) (or (backward-button 1 nil t t) (ffap-next-guess t)))) (defun jao-notmuch-show-ret () (interactive) - (when-let (url (or (get-text-property (point) 'w3m-href-anchor) - (thing-at-point-url-at-point))) + (when-let* ((url (or (get-text-property (point) 'w3m-href-anchor) + (thing-at-point-url-at-point)))) (browse-url url))) @@ -215,7 +215,7 @@ ;;; header and mode lines with thread message counts (defun jao-notmuch--looking-at-new-p (&optional p) - (when-let (ts (if p (plist-get p :tags) (notmuch-show-get-tags))) + (when-let* ((ts (if p (plist-get p :tags) (notmuch-show-get-tags)))) (or (member "unread" ts) (member "new" ts)))) (defsubst jao-notmuch-tree--first-p (&optional msg) diff --git a/lib/net/jao-proton-utils.el b/lib/net/jao-proton-utils.el index 62b97b3..0a08f5d 100644 --- a/lib/net/jao-proton-utils.el +++ b/lib/net/jao-proton-utils.el @@ -1,6 +1,6 @@ ;; jao-proton-utils.el -- simple interaction with Proton mail and vpn -;; Copyright (c) 2018, 2019, 2020, 2023 Jose Antonio Ortega Ruiz +;; Copyright (c) 2018, 2019, 2020, 2023, 2026 Jose Antonio Ortega Ruiz ;; This file is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -86,7 +86,7 @@ (jao-proton-vpn--do "s")) (defun proton-vpn--get-status () - (or (when-let ((b (get-buffer jao-proton-vpn--buffer))) + (or (when-let* ((b (get-buffer jao-proton-vpn--buffer))) (with-current-buffer b (goto-char (point-min)) (if (re-search-forward "^Status: *\\(.+\\)$" nil t) diff --git a/lib/net/randomsig.el b/lib/net/randomsig.el index 05b95ab..9029f13 100644 --- a/lib/net/randomsig.el +++ b/lib/net/randomsig.el @@ -1,6 +1,6 @@ -;;; randomsig.el --- insert a randomly selected signature +;;; randomsig.el --- insert a randomly selected signature -*- lexical-binding: t; -*- -;; Copyright (C) 2001, 2002, 2013, 2020, 2021, 2024 Hans-Jürgen Ficker +;; Copyright (C) 2001, 2002, 2013, 2020, 2021, 2024, 2026 Hans-Jürgen Ficker ;; Emacs Lisp Archive Entry ;; Author: Hans-Juergen Ficker diff --git a/lib/prog/jao-compilation.el b/lib/prog/jao-compilation.el index 6c67a7d..fcd8037 100644 --- a/lib/prog/jao-compilation.el +++ b/lib/prog/jao-compilation.el @@ -67,8 +67,8 @@ ;;;###autoload (defun jao-compilation-root (&optional dir) - (when-let ((rfn (jao-compilation-find-root (or dir (buffer-file-name)) - jao-compilation-dominating-rx))) + (when-let* ((rfn (jao-compilation-find-root (or dir (buffer-file-name)) + jao-compilation-dominating-rx))) (let* ((default-directory (expand-file-name rfn)) (dir (file-name-directory rfn)) (rel-path (jao-path-relative-to dir default-directory))) @@ -80,13 +80,13 @@ ;;;###autoload (defun jao-compilation-root-file () - (when-let ((dir (jao-compilation-root))) + (when-let* ((dir (jao-compilation-root))) (car (directory-files dir nil jao-compilation-dominating-rx)))) ;;;###autoload (defun jao-find-compilation-root (dir) (when (and (stringp dir) (file-exists-p dir)) - (when-let ((root (jao-compilation-root dir))) + (when-let* ((root (jao-compilation-root dir))) (cons 'transient root)))) ;;;###autoload diff --git a/lib/themes/jao-themes.el b/lib/themes/jao-themes.el index 65d9c32..d21baf5 100644 --- a/lib/themes/jao-themes.el +++ b/lib/themes/jao-themes.el @@ -1199,7 +1199,7 @@ (push df fs))))) (defun jao-themes--adjust-palette (p s) - (if-let (v (alist-get s p)) (cons (cons s (car v)) (assoc-delete-all s p)) p)) + (if-let* ((v (alist-get s p))) (cons (cons s (car v)) (assoc-delete-all s p)) p)) (defun jao-themes--let-palette (palette) (let ((palette (seq-reduce #'jao-themes--adjust-palette '(fg bg box) palette))) -- cgit v1.2.3