summaryrefslogtreecommitdiffhomepage
path: root/custom/jao-custom-eww.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2024-11-07 18:01:13 +0000
committerjao <jao@gnu.org>2024-11-07 18:01:13 +0000
commit4308710de811e3b4e2fb47f9024439df03e96b90 (patch)
treefb719224f99c57d6b2b9b0bd4257208f7d038dc4 /custom/jao-custom-eww.el
parent5efb9fee7e72c8c514d08940e98f7eb24b90c374 (diff)
downloadelibs-4308710de811e3b4e2fb47f9024439df03e96b90.tar.gz
elibs-4308710de811e3b4e2fb47f9024439df03e96b90.tar.bz2
{if,when}-let deprecation in emacs 31
Diffstat (limited to 'custom/jao-custom-eww.el')
-rw-r--r--custom/jao-custom-eww.el8
1 files changed, 4 insertions, 4 deletions
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)