diff options
Diffstat (limited to 'attic/elisp')
-rw-r--r-- | attic/elisp/jao-maildir.el | 2 | ||||
-rw-r--r-- | attic/elisp/jao-notmuch-move.el | 8 | ||||
-rw-r--r-- | attic/elisp/misc.el | 6 | ||||
-rw-r--r-- | attic/elisp/nnnm.el | 16 |
4 files changed, 16 insertions, 16 deletions
diff --git a/attic/elisp/jao-maildir.el b/attic/elisp/jao-maildir.el index 90cf0b4..18a1725 100644 --- a/attic/elisp/jao-maildir.el +++ b/attic/elisp/jao-maildir.el @@ -90,7 +90,7 @@ 0)) (defun jao-maildir--update-track-string (mbox) - (when-let* ((track (seq-find (lambda (td) (string-match-p (car td) mbox)) + (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)) diff --git a/attic/elisp/jao-notmuch-move.el b/attic/elisp/jao-notmuch-move.el index d4626bf..eb7ea4c 100644 --- a/attic/elisp/jao-notmuch-move.el +++ b/attic/elisp/jao-notmuch-move.el @@ -1,6 +1,6 @@ ;;; jao-notmuch-move.el --- Move messages around in notmuch -*- lexical-binding: t; -*- -;; Copyright (C) 2021, 2024 jao +;; Copyright (C) 2021 jao ;; Author: jao <mail@jao.io> ;; Keywords: mail @@ -37,9 +37,9 @@ (user-error "Message not in any registered mailbox!"))) (defun jao-notmuch--msg-props () - (if-let* ((p (save-excursion - (beginning-of-line) - (text-property-search-forward :notmuch-message-properties)))) + (if-let ((p (save-excursion + (beginning-of-line) + (text-property-search-forward :notmuch-message-properties)))) (prop-match-value p) (user-error "No message at point"))) diff --git a/attic/elisp/misc.el b/attic/elisp/misc.el index 4cae427..2f1bcb0 100644 --- a/attic/elisp/misc.el +++ b/attic/elisp/misc.el @@ -25,7 +25,7 @@ ;; (defun jao-erlang-compile (arg) ;; (interactive "P") ;; (save-some-buffers) - ;; (when-let* ((mname (jao-erlang-current-module))) + ;; (when-let ((mname (jao-erlang-current-module))) ;; (with-current-buffer (jao-vterm-repl) ;; (vterm-send-string (format "c(%s).\n" mname)) ;; (sit-for 0) @@ -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" @@ -908,7 +908,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 () diff --git a/attic/elisp/nnnm.el b/attic/elisp/nnnm.el index 8a4185f..552e95c 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, 2024 jao +;; Copyright (C) 2021 jao ;; Author: jao <mail@jao.io> ;; 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) |