From 4308710de811e3b4e2fb47f9024439df03e96b90 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 7 Nov 2024 18:01:13 +0000 Subject: {if,when}-let deprecation in emacs 31 --- custom/jao-custom-eww.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'custom/jao-custom-eww.el') diff --git a/custom/jao-custom-eww.el b/custom/jao-custom-eww.el index 6a2e8e2..726f682 100644 --- a/custom/jao-custom-eww.el +++ b/custom/jao-custom-eww.el @@ -32,7 +32,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))) @@ -83,7 +83,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 @@ -91,7 +91,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) @@ -220,7 +220,7 @@ It should be the title of the web page as returned by `rdrview'" (with-eval-after-load "org" (require 'ol-eww nil t)) (defun jao-eww-buffer-name () - (when-let ((s (or (plist-get eww-data :title) + (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) -- cgit v1.2.3