diff options
author | Andrew Cohen <cohen@andy.bu.edu> | 2011-08-03 22:09:04 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2011-08-03 22:09:04 +0000 |
commit | 19fe0c2e44466a0b9457ef11d23ce0b6e18baa99 (patch) | |
tree | 63908993e1aaabc55013c4442c73616db66f309a /lisp/gnus/nnir.el | |
parent | 640c8776f65beda19e4d4221b1cc2fe7a4b503d0 (diff) |
nnir.el (nnir-read-server-parm): Add an argument to restrict to server-variables only. This should fix a bug introduced with commit e1889675b7f4adf057833c5513c9374134c4e053.
(nnir-run-query): 'nnir-search-engine should not be set from the global environment.
Diffstat (limited to 'lisp/gnus/nnir.el')
-rw-r--r-- | lisp/gnus/nnir.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index d35e6560e7..17fc3f3fe8 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el @@ -1624,7 +1624,7 @@ actually)." (let* ((server (car x)) (nnir-search-engine (or (nnir-read-server-parm 'nnir-search-engine - server) + server t) (cdr (assoc (car (gnus-server-to-method server)) nnir-method-default-engines)))) @@ -1643,14 +1643,16 @@ actually)." nil))) groups)))) -(defun nnir-read-server-parm (key server) - "Returns the parameter value of key for the given server, where -server is of form 'backend:name'." +(defun nnir-read-server-parm (key server &optional not-global) + "Returns the parameter value corresponding to `key' for +`server'. If no server-specific value is found consult the global +environment unless `not-global' is non-nil." (let ((method (gnus-server-to-method server))) (cond ((and method (assq key (cddr method))) - (nth 1 (assq key (cddr method)))) - ((boundp key) (symbol-value key)) - (t nil)))) + (nth 1 (assq key (cddr method)))) + ((and (not not-global) (boundp key)) (symbol-value key)) + (t nil)))) + (defun nnir-possibly-change-server (server) (unless (and server (nnir-server-opened server)) |