diff options
| author | Andrew Cohen | 2011-08-03 22:09:04 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2011-08-03 22:09:04 +0000 |
| commit | 19fe0c2e44466a0b9457ef11d23ce0b6e18baa99 (patch) | |
| tree | 63908993e1aaabc55013c4442c73616db66f309a | |
| parent | 640c8776f65beda19e4d4221b1cc2fe7a4b503d0 (diff) | |
| download | emacs-19fe0c2e44466a0b9457ef11d23ce0b6e18baa99.tar.gz emacs-19fe0c2e44466a0b9457ef11d23ce0b6e18baa99.zip | |
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.
| -rw-r--r-- | lisp/gnus/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/gnus/nnir.el | 16 |
2 files changed, 17 insertions, 7 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index e88b5154c76..9029ab8e6fd 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2011-08-03 Andrew Cohen <cohen@andy.bu.edu> | ||
| 2 | |||
| 3 | * nnir.el (nnir-read-server-parm): Add an argument to restrict to | ||
| 4 | server-variables only. This should fix a bug introduced with commit | ||
| 5 | e1889675b7f4adf057833c5513c9374134c4e053. | ||
| 6 | (nnir-run-query): 'nnir-search-engine should not be set from the global | ||
| 7 | environment. | ||
| 8 | |||
| 1 | 2011-08-02 Andrew Cohen <cohen@andy.bu.edu> | 9 | 2011-08-02 Andrew Cohen <cohen@andy.bu.edu> |
| 2 | 10 | ||
| 3 | * nnir.el (nnir-search-thread): Position point on referring article | 11 | * nnir.el (nnir-search-thread): Position point on referring article |
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index d35e6560e71..17fc3f3fe81 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el | |||
| @@ -1624,7 +1624,7 @@ actually)." | |||
| 1624 | (let* ((server (car x)) | 1624 | (let* ((server (car x)) |
| 1625 | (nnir-search-engine | 1625 | (nnir-search-engine |
| 1626 | (or (nnir-read-server-parm 'nnir-search-engine | 1626 | (or (nnir-read-server-parm 'nnir-search-engine |
| 1627 | server) | 1627 | server t) |
| 1628 | (cdr (assoc (car | 1628 | (cdr (assoc (car |
| 1629 | (gnus-server-to-method server)) | 1629 | (gnus-server-to-method server)) |
| 1630 | nnir-method-default-engines)))) | 1630 | nnir-method-default-engines)))) |
| @@ -1643,14 +1643,16 @@ actually)." | |||
| 1643 | nil))) | 1643 | nil))) |
| 1644 | groups)))) | 1644 | groups)))) |
| 1645 | 1645 | ||
| 1646 | (defun nnir-read-server-parm (key server) | 1646 | (defun nnir-read-server-parm (key server &optional not-global) |
| 1647 | "Returns the parameter value of key for the given server, where | 1647 | "Returns the parameter value corresponding to `key' for |
| 1648 | server is of form 'backend:name'." | 1648 | `server'. If no server-specific value is found consult the global |
| 1649 | environment unless `not-global' is non-nil." | ||
| 1649 | (let ((method (gnus-server-to-method server))) | 1650 | (let ((method (gnus-server-to-method server))) |
| 1650 | (cond ((and method (assq key (cddr method))) | 1651 | (cond ((and method (assq key (cddr method))) |
| 1651 | (nth 1 (assq key (cddr method)))) | 1652 | (nth 1 (assq key (cddr method)))) |
| 1652 | ((boundp key) (symbol-value key)) | 1653 | ((and (not not-global) (boundp key)) (symbol-value key)) |
| 1653 | (t nil)))) | 1654 | (t nil)))) |
| 1655 | |||
| 1654 | 1656 | ||
| 1655 | (defun nnir-possibly-change-server (server) | 1657 | (defun nnir-possibly-change-server (server) |
| 1656 | (unless (and server (nnir-server-opened server)) | 1658 | (unless (and server (nnir-server-opened server)) |