diff options
Diffstat (limited to 'lib/net')
| -rw-r--r-- | lib/net/jao-eww-session.el | 10 | ||||
| -rw-r--r-- | lib/net/jao-notmuch-gnus.el | 18 | ||||
| -rw-r--r-- | lib/net/jao-notmuch.el | 16 | ||||
| -rw-r--r-- | lib/net/jao-proton-utils.el | 4 | ||||
| -rw-r--r-- | lib/net/randomsig.el | 4 |
5 files changed, 26 insertions, 26 deletions
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 <jao@gnu.org> ;; 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 <mail@jao.io> ;; 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 <hj@backmes.de> |
