]> git.eshelyaron.com Git - emacs.git/commit
Rework setting/unsetting of gnus-registry-enabled
authorEric Abrahamsen <eric@ericabrahamsen.net>
Wed, 12 Jan 2022 22:58:46 +0000 (14:58 -0800)
committerEric Abrahamsen <eric@ericabrahamsen.net>
Wed, 12 Jan 2022 22:58:46 +0000 (14:58 -0800)
commit097e0ee4a20f09d7d1262ddb56ca1a0e5ed1e156
tree47da784df7b06d55c82b214f207ba90eeef72705
parent917a623a9dd21bc1d73fd13d91de57d924ce2692
Rework setting/unsetting of gnus-registry-enabled

The basic idea is, we're moving the setting/unsetting of
`gnus-registry-enabled' so that it is a more reliable indicator of
whether the registry is actually available or not.

* lisp/gnus/gnus-registry.el (gnus-registry-load): Move the setting of
`gnus-registry-enabled' here, after we're sure the registry actually
has been loaded.
(gnus-registry-initialize): Move it out of here. All this function
does is conditionally call `gnus-registry-load'.
(gnus-registry-register-message-ids): Only check
`gnus-registry-enabled', since we'd more confident about this
now. Sort checks in order of increasing complexity.
(gnus-registry-clear): Unset `gnus-registry-enabled'.
(gnus-registry-install-hooks): This function should only install
hooks, not set variables.
(gnus-registry-unload-hook): Change the unload hook to call
`gnus-registry-clear', as that will do all the necessary
work (including calling `gnus-registry-unload-hook')
lisp/gnus/gnus-registry.el