+2013-04-04 Andrew Cohen <cohen@bu.edu>
+
+ * nnir.el (gnus-nnir-group-p): New function.
+ (nnir-possibly-change-group): Use it.
+
+ * gnus-msg.el (gnus-setup-message): Use it.
+
2013-04-04 Katsumi Yamaoka <yamaoka@jpl.org>
* mml.el (mml-minibuffer-read-description): Use `default' insted of
(autoload 'nnir-article-number "nnir" nil nil 'macro)
(autoload 'nnir-article-group "nnir" nil nil 'macro)
+(autoload 'gnus-nnir-group-p "nnir")
(defvar gnus-article-reply nil)
`(let ((,winconf (current-window-configuration))
(,winconf-name gnus-current-window-configuration)
(,buffer (buffer-name (current-buffer)))
- (,article (or (when (and
- (string-match "^nnir:" gnus-newsgroup-name)
- gnus-article-reply)
- (nnir-article-number gnus-article-reply))
- gnus-article-reply))
- (,yanked gnus-article-yanked-articles)
- (,group (or (when (and
- (string-match "^nnir:" gnus-newsgroup-name)
+ (,article (if (and (gnus-nnir-group-p gnus-newsgroup-name)
gnus-article-reply)
- (nnir-article-group gnus-article-reply))
- gnus-newsgroup-name))
+ (nnir-article-number gnus-article-reply)
+ gnus-article-reply))
+ (,yanked gnus-article-yanked-articles)
+ (,group (if (and (gnus-nnir-group-p gnus-newsgroup-name)
+ gnus-article-reply)
+ (nnir-article-group gnus-article-reply)
+ gnus-newsgroup-name))
(message-header-setup-hook
(copy-sequence message-header-setup-hook))
(mbl mml-buffer-list)
;;; Util Code:
+(defun gnus-nnir-group-p (group)
+ "Say whether GROUP is nnir or not."
+ (if (gnus-group-prefixed-p group)
+ (eq 'nnir (car (gnus-find-method-for-group group)))
+ (and group (string-match "^nnir" group))))
+
(defun nnir-read-parms (nnir-search-engine)
"Reads additional search parameters according to `nnir-engines'."
(let ((parmspec (caddr (assoc nnir-search-engine nnir-engines))))
(defun nnir-possibly-change-group (group &optional server)
(or (not server) (nnir-server-opened server) (nnir-open-server server))
- (when (and group (string-match "\\`nnir" group))
+ (when (gnus-nnir-group-p group)
(setq nnir-artlist (gnus-group-get-parameter
(gnus-group-prefixed-name
(gnus-group-short-name group) '(nnir "nnir"))