lisp/org-persist.el (and): Fix typo

Use `unless' instead of erroneous `when' in the test whether to run
lockfile timer.

Reported-by: Karthik Chikmagalur
This commit is contained in:
Ihor Radchenko 2024-01-31 12:18:05 +01:00
parent afc529b4a0
commit 15e51d7083
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 5 additions and 5 deletions

View File

@ -1313,11 +1313,11 @@ such scenario."
(defvar org-persist--refresh-gc-lock-timer nil
"Timer used to refresh session timestamp in `org-persist-gc-lock-file'.")
(when (and org-persist--disable-when-emacs-Q
;; FIXME: This is relying on undocumented fact that
;; Emacs sets `user-init-file' to nil when loaded with
;; "-Q" argument.
(not user-init-file))
(unless (and org-persist--disable-when-emacs-Q
;; FIXME: This is relying on undocumented fact that
;; Emacs sets `user-init-file' to nil when loaded with
;; "-Q" argument.
(not user-init-file))
(unless org-persist--refresh-gc-lock-timer
(setq org-persist--refresh-gc-lock-timer
(run-at-time nil org-persist-gc-lock-interval #'org-persist--refresh-gc-lock))))