diff options
| author | jao <jao@gnu.org> | 2026-08-25 21:11:27 +0100 |
|---|---|---|
| committer | jao <jao@gnu.org> | 2026-08-25 21:11:27 +0100 |
| commit | ca31697cc95491c19ff257c29bdab3b88d043b09 (patch) | |
| tree | bc14b9744c783dd1121b36ffadf21e3d7dc0bb7a /lib/doc | |
| parent | dba7a443d0edb88869c4df70622543a465cf9304 (diff) | |
| download | elibs-ca31697cc95491c19ff257c29bdab3b88d043b09.tar.gz elibs-ca31697cc95491c19ff257c29bdab3b88d043b09.tar.bz2 | |
emacs 31main
Diffstat (limited to 'lib/doc')
| -rw-r--r-- | lib/doc/jao-doc-session.el | 4 | ||||
| -rw-r--r-- | lib/doc/jao-doc-view.el | 12 | ||||
| -rw-r--r-- | lib/doc/jao-org-links.el | 2 | ||||
| -rw-r--r-- | lib/doc/jao-org-notes.el | 6 | ||||
| -rw-r--r-- | lib/doc/jao-pdf.el | 8 |
5 files changed, 17 insertions, 15 deletions
diff --git a/lib/doc/jao-doc-session.el b/lib/doc/jao-doc-session.el index df7e994..31b92c7 100644 --- a/lib/doc/jao-doc-session.el +++ b/lib/doc/jao-doc-session.el @@ -1,6 +1,6 @@ ;;; jao-doc-session.el --- persistent document sessions -*- lexical-binding: t; -*- -;; Copyright (C) 2022, 2024, 2025 jao +;; Copyright (C) 2022, 2024, 2025, 2026 jao ;; Author: jao <mail@jao.io> ;; Keywords: docs @@ -20,6 +20,8 @@ ;;; Code: +(require 'multisession) + (define-multisession-variable jao-doc--session nil) (defun jao-doc-session () (multisession-value jao-doc--session)) diff --git a/lib/doc/jao-doc-view.el b/lib/doc/jao-doc-view.el index fe26c1d..223984a 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, 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 @@ -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,8 @@ (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 95f2d67..8ccd06a 100644 --- a/lib/doc/jao-org-links.el +++ b/lib/doc/jao-org-links.el @@ -127,7 +127,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 4ec0221..fbe3c1f 100644 --- a/lib/doc/jao-org-notes.el +++ b/lib/doc/jao-org-notes.el @@ -163,7 +163,7 @@ Search terms that start with a colon are interpreted as tags, and can appear in any order in the tags list. " (interactive) - (when-let (f (jao-org-notes--consult-rg "Search tags and titles: ")) + (when-let* ((f (jao-org-notes--consult-rg "Search tags and titles: "))) (find-file f))) (defvar jao-org-notes-consult-ripgrep-args @@ -207,7 +207,7 @@ appear in any order in the tags list. (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 () @@ -218,7 +218,7 @@ appear in any order in the tags list. (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 diff --git a/lib/doc/jao-pdf.el b/lib/doc/jao-pdf.el index 162cd9a..5d27048 100644 --- a/lib/doc/jao-pdf.el +++ b/lib/doc/jao-pdf.el @@ -145,9 +145,9 @@ (defun jao-open-doc (&optional file page height) (interactive) - (when-let (file (or file - (read-file-name "Document: " - (concat jao-org-dir "/doc/")))) + (when-let* ((file (or file + (read-file-name "Document: " + (concat jao-org-dir "/doc/"))))) (funcall jao-open-doc-fun file page height))) (defun jao-select-pdf () @@ -157,7 +157,7 @@ (defun jao-open-with-zathura () (interactive) - (when-let (f buffer-file-name) + (when-let* ((f buffer-file-name)) (let ((p (jao-doc-view-current-page))) (cond (jao-river-enabled (jao-river-open-with-zathura f p)) (jao-sway-enabled (jao-sway-open-with-zathura f p)) |
