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 ++++++++-------- 4 files changed, 22 insertions(+), 22 deletions(-) (limited to 'attic') 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) -- cgit v1.2.3