diff options
author | Eric Abrahamsen <eric@ericabrahamsen.net> | 2021-09-07 11:51:39 -0700 |
---|---|---|
committer | Eric Abrahamsen <eric@ericabrahamsen.net> | 2021-09-07 11:51:39 -0700 |
commit | 6cca705aa6b2ae93da8e0cd0da71f87fe583058c (patch) | |
tree | 5faa8dde0712e4420b035f6016e9e10f20c96736 /lisp/gnus/nndiary.el | |
parent | 0cd410fb82d780f3c3d3e870103344ca6ef83234 (diff) | |
download | emacs-6cca705aa6b2ae93da8e0cd0da71f87fe583058c.tar.gz |
Don't let nndiary.el alter variables when loading file
* lisp/gnus/nndiary.el (nndiary-open-server): Move the manipulation of
`gnus-extra-headers' and `nnmail-extra-headers' into this function: it
should only happen if we're actually firing up an nndiary server.
Previously, simply attempting to complete a gnus-* prefixed symbol
could end up loading this file, and changing the variable values.
Diffstat (limited to 'lisp/gnus/nndiary.el')
-rw-r--r-- | lisp/gnus/nndiary.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index adf4427523f..133e0307a54 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el @@ -416,6 +416,11 @@ all. This may very well take some time.") (deffoo nndiary-open-server (server &optional defs) (nnoo-change-server 'nndiary server defs) + (dolist (header nndiary-headers) + (setq header (intern (format "X-Diary-%s" (car header)))) + ;; Required for building NOV databases and some other stuff. + (add-to-list 'gnus-extra-headers header) + (add-to-list 'nnmail-extra-headers header)) (when (not (file-exists-p nndiary-directory)) (ignore-errors (make-directory nndiary-directory t))) (cond @@ -1557,12 +1562,6 @@ all. This may very well take some time.") ;; The end... =============================================================== -(dolist (header nndiary-headers) - (setq header (intern (format "X-Diary-%s" (car header)))) - ;; Required for building NOV databases and some other stuff. - (add-to-list 'gnus-extra-headers header) - (add-to-list 'nnmail-extra-headers header)) - (unless (assoc "nndiary" gnus-valid-select-methods) (gnus-declare-backend "nndiary" 'post-mail 'respool 'address)) |