From 75220ccdee2f3de039498b717d2b15c04f676d2a Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 28 Sep 2025 01:25:21 +0100 Subject: multisession variables instead of persist --- lib/doc/jao-doc-session.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/doc/jao-doc-session.el') diff --git a/lib/doc/jao-doc-session.el b/lib/doc/jao-doc-session.el index b54a942..cea9356 100644 --- a/lib/doc/jao-doc-session.el +++ b/lib/doc/jao-doc-session.el @@ -20,7 +20,9 @@ ;;; Code: -(persist-defvar jao-doc-session nil "Documents session") +(define-multisession-variable jao-doc-session "Documents session") + +(defun jao-doc-session () (multisession-value jao-doc-session)) (defvar-local jao-doc-session-is-doc nil "Setting this variable as t in a buffer will mark it as belonging to a session. @@ -31,8 +33,6 @@ See also `jao-doc-session-mark'.") "Check whether the given or current buffer belong to the doc session." (buffer-local-value 'jao-doc-session-is-doc (or buffer (current-buffer)))) -(defun jao-doc-session (&optional file) jao-doc-session) - (defun jao-doc-session-save (&optional skip-current force) "Traverse all current buffers and update the value of `jao-doc-session'." (interactive) @@ -43,7 +43,7 @@ See also `jao-doc-session-mark'.") (fs (if (listp fs) fs (list (buffer-file-name b))))) (dolist (f fs) (add-to-list 'docs f)))) (when (or force (> (length docs) 0)) - (setq jao-doc-session docs)))) + (setf (jao-doc-session) docs)))) (defun jao-doc-session-mark (&optional path) "Mark the current buffer's file, or PATH, as persistent across sessions." -- cgit v1.2.3