emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master ae76ce5: Gnus registry shutdown should also run the


From: Eric Abrahamsen
Subject: [Emacs-diffs] master ae76ce5: Gnus registry shutdown should also run the unload-hook
Date: Tue, 1 Oct 2019 19:26:05 -0400 (EDT)

branch: master
commit ae76ce57cfc6cd062f38a3ea1146689d60e10b9c
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    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.
---
 lisp/gnus/gnus-registry.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index a16017f..16e578c 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."
 ;; (defalias 'gnus-user-format-function-M 
'gnus-registry-article-marks-to-chars)
 (defun gnus-registry-article-marks-to-chars (headers)
   "Show the marks for an article by the :char property."
-  (if (eieio-object-p gnus-registry-db)
+  (if gnus-registry-enabled
       (let* ((id (mail-header-message-id headers))
              (marks (when id (gnus-registry-get-id-key id 'mark))))
        (concat (delq nil
@@ -1023,7 +1023,7 @@ Uses `gnus-registry-marks' to find what shortcuts to 
install."
 ;; (defalias 'gnus-user-format-function-M 
'gnus-registry-article-marks-to-names)
 (defun gnus-registry-article-marks-to-names (headers)
   "Show the marks for an article by name."
-  (if (eieio-object-p gnus-registry-db)
+  (if gnus-registry-enabled
       (let* ((id (mail-header-message-id headers))
              (marks (when id (gnus-registry-get-id-key id 'mark))))
        (mapconcat (lambda (mark) (symbol-name mark)) marks ","))
@@ -1166,6 +1166,7 @@ only the last one's marks are returned."
 
 (defun gnus-registry-clear ()
   "Clear the registry."
+  (gnus-registry-unload-hook)
   (setq gnus-registry-db nil))
 
 (gnus-add-shutdown 'gnus-registry-clear 'gnus)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]