Improve og-update-terms interactive calling detect

This commit is contained in:
TEC 2022-10-13 23:10:09 +08:00
parent e598ef072d
commit 060ad369c7
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 3 additions and 3 deletions

View File

@ -1874,9 +1874,9 @@ This should only be run as an export hook."
(puthash term-str term-entry
org-glossary--quicklookup-cache)))))
(defun org-glossary-update-terms ()
(defun org-glossary-update-terms (&optional show-info)
"Update the currently known terms."
(interactive)
(interactive "p")
(unless (derived-mode-p 'org-mode)
(user-error "You need to be using `org-mode' to use org-glossary."))
(let ((initial-terms (mapcar (lambda (trm) (plist-get trm :term))
@ -1887,7 +1887,7 @@ This should only be run as an export hook."
(org-glossary--mrx-construct-from-terms org-glossary--terms)
org-glossary--quicklookup-cache (make-hash-table :test #'equal)
org-glossary--help-echo-cache (make-hash-table :test #'equal))
(when (called-interactively-p)
(when show-info
(org-glossary--term-status-message
(mapcar (lambda (trm) (plist-get trm :term))
org-glossary--terms)