diff options
author | Jose Antonio Ortega Ruiz <jao@imladris.local> | 2019-01-11 23:06:10 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@imladris.local> | 2019-01-11 23:06:10 +0000 |
commit | 00fc4d5a9e6ee0963924c0682653b264e6f8c268 (patch) | |
tree | 622b98302cc441cc135e962377abcafab73cd16c | |
parent | 4f079d49199d7faa2e4e89f220c4651ff6d23db2 (diff) | |
download | elibs-00fc4d5a9e6ee0963924c0682653b264e6f8c268.tar.gz elibs-00fc4d5a9e6ee0963924c0682653b264e6f8c268.tar.bz2 |
Periodic session saving in doc-view
-rw-r--r-- | doc/jao-doc-view.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/jao-doc-view.el b/doc/jao-doc-view.el index 0398e60..c51a67e 100644 --- a/doc/jao-doc-view.el +++ b/doc/jao-doc-view.el @@ -124,15 +124,21 @@ (defvar jao-doc-session-timer-seconds 60) (defun jao-doc-view-stop-session-timer () + (interactive) (when jao-doc-session-timer (cancel-timer jao-doc-session-timer) (setq jao-doc-session-timer nil))) +(defun jao-doc-view--save-session () + (let ((inhibit-message t)) + (jao-doc-view-save-session))) + (defun jao-doc-view-start-session-timer () + (interactive) (setq jao-doc-session-timer (run-with-idle-timer jao-doc-session-timer-seconds t - 'jao-doc-view-save-session))) + 'jao-doc-view--save-session))) (defun jao-doc-view-install () (jao-doc-view--current-bmks) |