mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
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.
This commit is contained in:
parent
0cd410fb82
commit
6cca705aa6
1 changed files with 5 additions and 6 deletions
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue