diff options
| author | Andrew Cohen | 2013-04-04 22:15:25 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2013-04-04 22:15:25 +0000 |
| commit | 567d89caf1304c780e3cedc9db4c31a2ce57d588 (patch) | |
| tree | 9b1e70a237ac4ca17242257f5b9b4202a1d2ec86 | |
| parent | 47d038b3af124e8244e5c8248a71dc169f5dfaac (diff) | |
| download | emacs-567d89caf1304c780e3cedc9db4c31a2ce57d588.tar.gz emacs-567d89caf1304c780e3cedc9db4c31a2ce57d588.zip | |
gnus-msg.el: Fix detection of nnir group
| -rw-r--r-- | lisp/gnus/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/gnus/gnus-msg.el | 19 | ||||
| -rw-r--r-- | lisp/gnus/nnir.el | 8 |
3 files changed, 23 insertions, 11 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 59be8293bb3..ca78e7c99b4 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2013-04-04 Andrew Cohen <cohen@bu.edu> | ||
| 2 | |||
| 3 | * nnir.el (gnus-nnir-group-p): New function. | ||
| 4 | (nnir-possibly-change-group): Use it. | ||
| 5 | |||
| 6 | * gnus-msg.el (gnus-setup-message): Use it. | ||
| 7 | |||
| 1 | 2013-04-04 Katsumi Yamaoka <yamaoka@jpl.org> | 8 | 2013-04-04 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 9 | ||
| 3 | * mml.el (mml-minibuffer-read-description): Use `default' insted of | 10 | * mml.el (mml-minibuffer-read-description): Use `default' insted of |
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 7503afdab36..36135556c73 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -417,6 +417,7 @@ Thank you for your help in stamping out bugs. | |||
| 417 | 417 | ||
| 418 | (autoload 'nnir-article-number "nnir" nil nil 'macro) | 418 | (autoload 'nnir-article-number "nnir" nil nil 'macro) |
| 419 | (autoload 'nnir-article-group "nnir" nil nil 'macro) | 419 | (autoload 'nnir-article-group "nnir" nil nil 'macro) |
| 420 | (autoload 'gnus-nnir-group-p "nnir") | ||
| 420 | 421 | ||
| 421 | 422 | ||
| 422 | (defvar gnus-article-reply nil) | 423 | (defvar gnus-article-reply nil) |
| @@ -430,17 +431,15 @@ Thank you for your help in stamping out bugs. | |||
| 430 | `(let ((,winconf (current-window-configuration)) | 431 | `(let ((,winconf (current-window-configuration)) |
| 431 | (,winconf-name gnus-current-window-configuration) | 432 | (,winconf-name gnus-current-window-configuration) |
| 432 | (,buffer (buffer-name (current-buffer))) | 433 | (,buffer (buffer-name (current-buffer))) |
| 433 | (,article (or (when (and | 434 | (,article (if (and (gnus-nnir-group-p gnus-newsgroup-name) |
| 434 | (string-match "^nnir:" gnus-newsgroup-name) | ||
| 435 | gnus-article-reply) | ||
| 436 | (nnir-article-number gnus-article-reply)) | ||
| 437 | gnus-article-reply)) | ||
| 438 | (,yanked gnus-article-yanked-articles) | ||
| 439 | (,group (or (when (and | ||
| 440 | (string-match "^nnir:" gnus-newsgroup-name) | ||
| 441 | gnus-article-reply) | 435 | gnus-article-reply) |
| 442 | (nnir-article-group gnus-article-reply)) | 436 | (nnir-article-number gnus-article-reply) |
| 443 | gnus-newsgroup-name)) | 437 | gnus-article-reply)) |
| 438 | (,yanked gnus-article-yanked-articles) | ||
| 439 | (,group (if (and (gnus-nnir-group-p gnus-newsgroup-name) | ||
| 440 | gnus-article-reply) | ||
| 441 | (nnir-article-group gnus-article-reply) | ||
| 442 | gnus-newsgroup-name)) | ||
| 444 | (message-header-setup-hook | 443 | (message-header-setup-hook |
| 445 | (copy-sequence message-header-setup-hook)) | 444 | (copy-sequence message-header-setup-hook)) |
| 446 | (mbl mml-buffer-list) | 445 | (mbl mml-buffer-list) |
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index e7d004a8b2c..b96f0c1cb78 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el | |||
| @@ -1707,6 +1707,12 @@ actually)." | |||
| 1707 | 1707 | ||
| 1708 | ;;; Util Code: | 1708 | ;;; Util Code: |
| 1709 | 1709 | ||
| 1710 | (defun gnus-nnir-group-p (group) | ||
| 1711 | "Say whether GROUP is nnir or not." | ||
| 1712 | (if (gnus-group-prefixed-p group) | ||
| 1713 | (eq 'nnir (car (gnus-find-method-for-group group))) | ||
| 1714 | (and group (string-match "^nnir" group)))) | ||
| 1715 | |||
| 1710 | (defun nnir-read-parms (nnir-search-engine) | 1716 | (defun nnir-read-parms (nnir-search-engine) |
| 1711 | "Reads additional search parameters according to `nnir-engines'." | 1717 | "Reads additional search parameters according to `nnir-engines'." |
| 1712 | (let ((parmspec (caddr (assoc nnir-search-engine nnir-engines)))) | 1718 | (let ((parmspec (caddr (assoc nnir-search-engine nnir-engines)))) |
| @@ -1754,7 +1760,7 @@ environment unless `not-global' is non-nil." | |||
| 1754 | 1760 | ||
| 1755 | (defun nnir-possibly-change-group (group &optional server) | 1761 | (defun nnir-possibly-change-group (group &optional server) |
| 1756 | (or (not server) (nnir-server-opened server) (nnir-open-server server)) | 1762 | (or (not server) (nnir-server-opened server) (nnir-open-server server)) |
| 1757 | (when (and group (string-match "\\`nnir" group)) | 1763 | (when (gnus-nnir-group-p group) |
| 1758 | (setq nnir-artlist (gnus-group-get-parameter | 1764 | (setq nnir-artlist (gnus-group-get-parameter |
| 1759 | (gnus-group-prefixed-name | 1765 | (gnus-group-prefixed-name |
| 1760 | (gnus-group-short-name group) '(nnir "nnir")) | 1766 | (gnus-group-short-name group) '(nnir "nnir")) |