From ca31697cc95491c19ff257c29bdab3b88d043b09 Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 25 Aug 2026 21:11:27 +0100 Subject: emacs 31 --- custom/jao-custom-completion.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'custom/jao-custom-completion.el') 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 -- cgit v1.2.3