[gnus git] branch master updated: m0-5-294-g6c572d9 =1= gnus-msg.el: Fix detection of nnir group.

Andrew Cohen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  6c572d958646cf42abc5c163812a92f183f5be27 (commit)
      from  027c7149090fb3655dcdddd680b84bd4a579ca0a (commit)


- Log -----------------------------------------------------------------
commit 6c572d958646cf42abc5c163812a92f183f5be27
Author: Andrew Cohen <[email protected]>
Date:   Thu Apr 4 10:14:21 2013 -0400

    gnus-msg.el: Fix detection of nnir group.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3cac579..18970c4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2013-04-04  Andrew Cohen  <[email protected]>
+
+	* 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  <[email protected]>
 
 	* mml.el (mml-minibuffer-read-description): Use `default' insted of
diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el
index 7503afd..3613555 100644
--- a/lisp/gnus-msg.el
+++ b/lisp/gnus-msg.el
@@ -417,6 +417,7 @@ Thank you for your help in stamping out bugs.
 
 (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)
@@ -430,16 +431,14 @@ Thank you for your help in stamping out bugs.
     `(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)
+	   (,article (if (and (gnus-nnir-group-p gnus-newsgroup-name)
 				 gnus-article-reply)
-			    (nnir-article-number 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)
+	   (,group (if (and (gnus-nnir-group-p gnus-newsgroup-name)
 			      gnus-article-reply)
-			 (nnir-article-group gnus-article-reply))
+		       (nnir-article-group gnus-article-reply)
 	   	       gnus-newsgroup-name))
 	   (message-header-setup-hook
 	    (copy-sequence message-header-setup-hook))
diff --git a/lisp/nnir.el b/lisp/nnir.el
index cbe64ba..871ac96 100644
--- a/lisp/nnir.el
+++ b/lisp/nnir.el
@@ -1707,6 +1707,11 @@ actually)."
 
 ;;; Util Code:
 
+(defun gnus-nnir-group-p (group)
+  "Say whether GROUP is nnir or not."
+  (eq 'nnir (car (gnus-find-method-for-group 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))))
@@ -1754,7 +1759,7 @@ environment unless `not-global' is non-nil."
 
 (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"))

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog   |    7 +++++++
 lisp/gnus-msg.el |   19 +++++++++----------
 lisp/nnir.el     |    7 ++++++-
 3 files changed, 22 insertions(+), 11 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.