* lisp/gnus/gnus-registry.el (gnus-registry-unload-hook):
* lisp/gnus/spam-stat.el (spam-stat-unload-hook):
* lisp/gnus/spam.el (spam-unload-hook): Rename functions from this...
* lisp/gnus/gnus-registry.el (gnus-registry-unload-function):
* lisp/gnus/spam-stat.el (spam-stat-unload-function):
* lisp/gnus/spam.el (spam-unload-function): ...to this. Don't set the
corresponding variables, always return nil, update callers, and leave
old name as obsolete function aliases.
Ref: https://lists.gnu.org/r/emacs-devel/2025-02/msg00294.html
(cherry picked from commit
ceef9025944fd3d51122f913ed9a74a259db55f7)
(defun gnus-registry-clear ()
"Clear the registry."
- (gnus-registry-unload-hook)
+ (gnus-registry-unload-function)
(setq gnus-registry-db nil))
(gnus-add-shutdown 'gnus-registry-clear 'gnus)
(add-hook 'gnus-summary-prepare-hook #'gnus-registry-register-message-ids))
-(defun gnus-registry-unload-hook ()
+(defun gnus-registry-unload-function ()
"Uninstall the registry hooks."
(remove-hook 'gnus-summary-article-move-hook #'gnus-registry-action)
(remove-hook 'gnus-summary-article-delete-hook #'gnus-registry-action)
(remove-hook 'gnus-save-newsrc-hook #'gnus-registry-save)
(remove-hook 'gnus-read-newsrc-el-hook #'gnus-registry-load)
- (remove-hook 'gnus-summary-prepare-hook #'gnus-registry-register-message-ids))
-
-(add-hook 'gnus-registry-unload-hook #'gnus-registry-clear)
+ (remove-hook 'gnus-summary-prepare-hook #'gnus-registry-register-message-ids)
+ nil)
(defun gnus-registry-install-p ()
"Return non-nil if the registry is enabled (and maybe enable it first).
(gnus-registry-insert db k newv)))
(registry-reindex db))))
+(define-obsolete-function-alias 'gnus-registry-unload-hook
+ #'gnus-registry-unload-function "31.1")
+
(provide 'gnus-registry)
;;; gnus-registry.el ends here
(add-hook 'gnus-select-article-hook
#'spam-stat-store-gnus-article-buffer))
-(defun spam-stat-unload-hook ()
+(defun spam-stat-unload-function ()
"Uninstall the spam-stat function hooks."
(interactive)
(remove-hook 'nnmail-prepare-incoming-message-hook
#'spam-stat-store-current-buffer)
(remove-hook 'gnus-select-article-hook
- #'spam-stat-store-gnus-article-buffer))
+ #'spam-stat-store-gnus-article-buffer)
+ nil)
-(add-hook 'spam-stat-unload-hook #'spam-stat-unload-hook)
+(define-obsolete-function-alias 'spam-stat-unload-hook
+ #'spam-stat-unload-function "31.1")
(provide 'spam-stat)
;; Don't install things more than once.
(setq spam-install-hooks nil)))
-(defun spam-unload-hook ()
+(defun spam-unload-function ()
"Uninstall the spam.el hooks."
(interactive)
(spam-teardown-widening)
(remove-hook 'gnus-summary-prepare-exit-hook #'spam-summary-prepare-exit)
(remove-hook 'gnus-summary-prepare-hook #'spam-summary-prepare)
(remove-hook 'gnus-get-new-news-hook #'spam-setup-widening)
- (remove-hook 'gnus-summary-prepare-hook #'spam-find-spam))
-
-(add-hook 'spam-unload-hook #'spam-unload-hook)
+ (remove-hook 'gnus-summary-prepare-hook #'spam-find-spam)
+ nil)
;;}}}
+(define-obsolete-function-alias 'spam-unload-hook #'spam-unload-function "31.1")
+
(provide 'spam)
;;; spam.el ends here