diff options
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") |