aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Abrahamsen2019-10-01 16:25:11 -0700
committerEric Abrahamsen2019-10-01 16:25:11 -0700
commitae76ce57cfc6cd062f38a3ea1146689d60e10b9c (patch)
treefae11ae5b879ea5e7ad28509610aa1a39ea543dd
parent2698d3dba2e9858b026ed127d4de3f86810a5ef3 (diff)
downloademacs-ae76ce57cfc6cd062f38a3ea1146689d60e10b9c.tar.gz
emacs-ae76ce57cfc6cd062f38a3ea1146689d60e10b9c.zip
Gnus registry shutdown should also run the unload-hook
* lisp/gnus/gnus-registry.el (gnus-registry-clear): Clearing the registry should also run the unload hooks. (gnus-registry-article-marks-to-names, gnus-registry-article-marks-to-chars): Now we can use a more general test here.
-rw-r--r--lisp/gnus/gnus-registry.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index a16017ff6d4..16e578cc745 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -1007,7 +1007,7 @@ Uses `gnus-registry-marks' to find what shortcuts to install."
1007;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-chars) 1007;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-chars)
1008(defun gnus-registry-article-marks-to-chars (headers) 1008(defun gnus-registry-article-marks-to-chars (headers)
1009 "Show the marks for an article by the :char property." 1009 "Show the marks for an article by the :char property."
1010 (if (eieio-object-p gnus-registry-db) 1010 (if gnus-registry-enabled
1011 (let* ((id (mail-header-message-id headers)) 1011 (let* ((id (mail-header-message-id headers))
1012 (marks (when id (gnus-registry-get-id-key id 'mark)))) 1012 (marks (when id (gnus-registry-get-id-key id 'mark))))
1013 (concat (delq nil 1013 (concat (delq nil
@@ -1023,7 +1023,7 @@ Uses `gnus-registry-marks' to find what shortcuts to install."
1023;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-names) 1023;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-names)
1024(defun gnus-registry-article-marks-to-names (headers) 1024(defun gnus-registry-article-marks-to-names (headers)
1025 "Show the marks for an article by name." 1025 "Show the marks for an article by name."
1026 (if (eieio-object-p gnus-registry-db) 1026 (if gnus-registry-enabled
1027 (let* ((id (mail-header-message-id headers)) 1027 (let* ((id (mail-header-message-id headers))
1028 (marks (when id (gnus-registry-get-id-key id 'mark)))) 1028 (marks (when id (gnus-registry-get-id-key id 'mark))))
1029 (mapconcat (lambda (mark) (symbol-name mark)) marks ",")) 1029 (mapconcat (lambda (mark) (symbol-name mark)) marks ","))
@@ -1166,6 +1166,7 @@ only the last one's marks are returned."
1166 1166
1167(defun gnus-registry-clear () 1167(defun gnus-registry-clear ()
1168 "Clear the registry." 1168 "Clear the registry."
1169 (gnus-registry-unload-hook)
1169 (setq gnus-registry-db nil)) 1170 (setq gnus-registry-db nil))
1170 1171
1171(gnus-add-shutdown 'gnus-registry-clear 'gnus) 1172(gnus-add-shutdown 'gnus-registry-clear 'gnus)