X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fnnir.el;h=17fc3f3fe81e5775deb9388de765e58243cf5535;hb=36dbb5212cc422e6a2f96a41cbc9a46881aa3636;hp=d35e6560e714bbe03f4c5f969ab1031eb95483e9;hpb=5fcf9414d64f92eef4f50a136fe4cd59a84fbcd2;p=gnus diff --git a/lisp/nnir.el b/lisp/nnir.el index d35e6560e..17fc3f3fe 100644 --- a/lisp/nnir.el +++ b/lisp/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))