summaryrefslogtreecommitdiffhomepage
path: root/lib/eos/jao-afio.el
diff options
context:
space:
mode:
Diffstat (limited to 'lib/eos/jao-afio.el')
-rw-r--r--lib/eos/jao-afio.el18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/eos/jao-afio.el b/lib/eos/jao-afio.el
index 0f1ae43..c8f4b7d 100644
--- a/lib/eos/jao-afio.el
+++ b/lib/eos/jao-afio.el
@@ -72,25 +72,29 @@
(when (y-or-n-p (format "Load saved session? (%d docs)" (length docs)))
(jao-afio-open-pdf-session docs))))))
-(declare w3m "w3m")
-(declare w3m-alive-p "w3m")
-(declare w3m-previous-buffer "w3m")
-(declare notmuch "notmuch")
+(declare-function w3m "w3m")
+(declare-function notmuch "notmuch")
+(declare-function jao-eww-session-eww-buffers "jao-eww-session")
+(declare-function jao-eww-session-load "jao-eww-session")
+
+(defun jao-afio--open-eww-sesion ()
+ (when (null (jao-eww-session-eww-buffers))
+ (jao-eww-session-load)))
;;;###autoload
(defun jao-afio-open-www ()
(interactive)
(require 'jao-eww-session)
(if (< (frame-width) 160)
- (if jao-afio-use-w3m (w3m) (jao-eww-session-load))
+ (if jao-afio-use-w3m (w3m) (jao-afio--open-eww-session))
(delete-other-windows)
(split-window-right)
(if jao-afio-use-w3m
(w3m)
- (jao-eww-session-load)
+ (jao-afio--open-eww-session)
(let ((b (current-buffer)))
(other-window 1)
- (switch-to-buffer (car (jao-eww-session--list-buffers b)))
+ (switch-to-buffer (car (jao-eww-session-eww-buffers b)))
(other-window 1)))))
;;;###autoload