diff options
author | jao <jao@gnu.org> | 2021-04-17 02:41:57 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-04-17 02:41:57 +0100 |
commit | 45bf5ca9f1ab4fcec6388ba9624e6eac719e0b24 (patch) | |
tree | a5aa1c1a1a634ac964bb5b189b0c34d58bcaddeb /lib/eos | |
parent | d82155d445a9c1f4630d2b667cd91f57730fa458 (diff) | |
download | elibs-45bf5ca9f1ab4fcec6388ba9624e6eac719e0b24.tar.gz elibs-45bf5ca9f1ab4fcec6388ba9624e6eac719e0b24.tar.bz2 |
nits
Diffstat (limited to 'lib/eos')
-rw-r--r-- | lib/eos/jao-afio.el | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/eos/jao-afio.el b/lib/eos/jao-afio.el index 90abc7f..7ebaf5d 100644 --- a/lib/eos/jao-afio.el +++ b/lib/eos/jao-afio.el @@ -64,22 +64,27 @@ (jao-afio--goto-frame next))) ;;;###autoload +(defvar jao-open-doc-fun 'find-file) + +;;;###autoload +(defun jao-afio-open-pdf-session () + (interactive) + (dolist (doc (jao-doc-view-session)) + (when (and (file-exists-p doc) (y-or-n-p (format "Open %s? " doc))) + (jao-open-doc doc)))) + (defun jao-afio-open-doc () (interactive) (delete-other-windows) (split-window-right) (let ((docs (remove-if-not (lambda (b) - (eq (buffer-local-value 'major-mode b) - 'pdf-view-mode)) + (with-current-buffer b (jao-doc-view--is-pdf))) (buffer-list)))) (if (car docs) (progn (switch-to-buffer (car docs)) (switch-to-buffer-other-window (or (cadr docs) (car docs)))) - (when (and (jao-doc-view-session) - (y-or-n-p "Load saved session? ")) - (dolist (doc (jao-doc-view-session)) - (when (and (file-exists-p doc) (y-or-n-p (format "Open %s? " doc))) - (find-file doc))))))) + (when (and (jao-doc-view-session) (y-or-n-p "Load saved session? ")) + (jao-afio-open-pdf-session))))) (defvar jao-afio-use-w3m nil) (declare w3m "w3m") |