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 | |
| parent | 5efb9fee7e72c8c514d08940e98f7eb24b90c374 (diff) | |
| download | elibs-4308710de811e3b4e2fb47f9024439df03e96b90.tar.gz elibs-4308710de811e3b4e2fb47f9024439df03e96b90.tar.bz2  | |
{if,when}-let deprecation in emacs 31
Diffstat (limited to 'lib/doc')
| -rw-r--r-- | lib/doc/jao-doc-session.el | 2 | ||||
| -rw-r--r-- | lib/doc/jao-doc-view.el | 13 | ||||
| -rw-r--r-- | lib/doc/jao-org-links.el | 2 | ||||
| -rw-r--r-- | lib/doc/jao-org-notes.el | 6 | 
4 files changed, 12 insertions, 11 deletions
diff --git a/lib/doc/jao-doc-session.el b/lib/doc/jao-doc-session.el index 877a8cb..928cf26 100644 --- a/lib/doc/jao-doc-session.el +++ b/lib/doc/jao-doc-session.el @@ -36,7 +36,7 @@    (let ((docs '())          (cb (and skip-current (current-buffer))))      (dolist (b (buffer-list)) -      (when-let (fs (and (not (eq cb b)) (jao-doc-session-is-doc b))) +      (when-let* ((fs (and (not (eq cb b)) (jao-doc-session-is-doc b))))          (dolist (f fs) (add-to-list 'docs f))))      (when (or force (> (length docs) 0))        (setq jao-doc-session docs)))) 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))))))  ;;; . diff --git a/lib/doc/jao-org-links.el b/lib/doc/jao-org-links.el index 88c0561..4fefedd 100644 --- a/lib/doc/jao-org-links.el +++ b/lib/doc/jao-org-links.el @@ -119,7 +119,7 @@  ;;;###autoload  (defun jao-org-goto-pdf ()    (interactive) -  (if-let (f (jao-org-org-to-pdf-file)) +  (if-let* ((f (jao-org-org-to-pdf-file)))        (jao-org--pdf-open f nil)      (user-error "No PDF file associated with this buffer"))) diff --git a/lib/doc/jao-org-notes.el b/lib/doc/jao-org-notes.el index 43b8c09..e47f845 100644 --- a/lib/doc/jao-org-notes.el +++ b/lib/doc/jao-org-notes.el @@ -147,7 +147,7 @@  (defun jao-org-notes-open ()    "Search for a note file, matching tags and titles with completion."    (interactive) -  (when-let (f (jao-org-notes--consult-rg "Search notes: ")) +  (when-let* ((f (jao-org-notes--consult-rg "Search notes: ")))      (find-file f)))  (defun jao-org-notes-consult-tags () @@ -180,7 +180,7 @@              (file (completing-read "File: " res nil t nil))              (entry (assoc file res)))        (progn (find-file (cadr entry)) -             (when-let (line (caddr entry)) (goto-line line))) +             (when-let* ((line (caddr entry))) (goto-line line)))      (message "Nobody links here!")))  (defun jao-org-notes-insert-tags () @@ -191,7 +191,7 @@  (defun jao-org-notes-insert-link ()    "Select a note file (with completion) and insert a link to it."    (interactive) -  (when-let (f (jao-org-notes--consult-rg "Notes file: ")) +  (when-let* ((f (jao-org-notes--consult-rg "Notes file: ")))      (let ((rel-path (file-relative-name f default-directory))            (title (with-current-buffer (find-file-noselect f)                     (save-excursion  | 
