diff options
author | jao <jao@gnu.org> | 2024-11-07 18:01:13 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2024-11-07 18:01:13 +0000 |
commit | 4308710de811e3b4e2fb47f9024439df03e96b90 (patch) | |
tree | fb719224f99c57d6b2b9b0bd4257208f7d038dc4 /lib/doc/jao-doc-view.el | |
parent | 5efb9fee7e72c8c514d08940e98f7eb24b90c374 (diff) | |
download | elibs-4308710de811e3b4e2fb47f9024439df03e96b90.tar.gz elibs-4308710de811e3b4e2fb47f9024439df03e96b90.tar.bz2 |
{if,when}-let deprecation in emacs 31
Diffstat (limited to 'lib/doc/jao-doc-view.el')
-rw-r--r-- | lib/doc/jao-doc-view.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/doc/jao-doc-view.el b/lib/doc/jao-doc-view.el index fe26c1d..75c2bae 100644 --- a/lib/doc/jao-doc-view.el +++ b/lib/doc/jao-doc-view.el @@ -1,6 +1,6 @@ ;;; jao-doc-view.el -- extensions for doc-view -*- lexical-binding: t; -*- -;; Copyright (c) 2013, 2015, 2017, 2018, 2019, 2021, 2022 Jose Antonio Ortega Ruiz +;; Copyright (c) 2013, 2015, 2017, 2018, 2019, 2021, 2022, 2024 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 @@ -49,20 +49,20 @@ (defvar-local jao-doc-view--trail-fwd ()) (defun jao-doc-view--trail-push (dest-page) - (when-let (page (jao-doc-view-current-page)) + (when-let* ((page (jao-doc-view-current-page))) (unless (eq (car jao-doc-view--trail-back) page) (push page jao-doc-view--trail-back)))) (defun jao-doc-view-back () (interactive nil doc-view-mode) - (if-let (p (pop jao-doc-view--trail-back)) + (if-let* ((p (pop jao-doc-view--trail-back))) (progn (push (jao-doc-view-current-page) jao-doc-view--trail-fwd) (jao-doc-view-goto-page p)) (message "No more back marks."))) (defun jao-doc-view-forward () (interactive nil doc-view-mode) - (if-let (p (pop jao-doc-view--trail-fwd)) + (if-let* ((p (pop jao-doc-view--trail-fwd))) (progn (push (jao-doc-view-current-page) jao-doc-view--trail-back) (jao-doc-view-goto-page p)) (message "No more forward marks."))) @@ -115,8 +115,9 @@ (cond ((eq 'wait urls) (message "Extracting text, please wait and retry.")) ((zerop (length urls)) (message "No URLs in this %s" (if all "document" "page"))) - (t (when-let (url (completing-read "URL: " urls nil nil - (when (null (cdr urls)) (car urls)))) + (t (when-let* ((url (completing-read "URL: " urls nil nil + (when (null (cdr urls)) + (car urls))))) (browse-url url)))))) ;;; . |