emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r112223: gnus-msg.el: Fix detection o


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112223: gnus-msg.el: Fix detection of nnir group
Date: Thu, 04 Apr 2013 22:15:25 +0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 112223
author: Andrew Cohen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2013-04-04 22:15:25 +0000
message:
  gnus-msg.el: Fix detection of nnir group
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-msg.el
  lisp/gnus/nnir.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2013-04-04 02:35:55 +0000
+++ b/lisp/gnus/ChangeLog       2013-04-04 22:15:25 +0000
@@ -1,3 +1,10 @@
+2013-04-04  Andrew Cohen  <address@hidden>
+
+       * 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  <address@hidden>
 
        * mml.el (mml-minibuffer-read-description): Use `default' insted of

=== modified file 'lisp/gnus/gnus-msg.el'
--- a/lisp/gnus/gnus-msg.el     2013-04-03 17:07:50 +0000
+++ b/lisp/gnus/gnus-msg.el     2013-04-04 22:15:25 +0000
@@ -417,6 +417,7 @@
 
 (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,17 +431,15 @@
     `(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))
+          (,article (if (and (gnus-nnir-group-p 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)
-                             gnus-article-reply)
-                        (nnir-article-group gnus-article-reply))
-                      gnus-newsgroup-name))
+          (,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)

=== modified file 'lisp/gnus/nnir.el'
--- a/lisp/gnus/nnir.el 2013-04-01 22:54:32 +0000
+++ b/lisp/gnus/nnir.el 2013-04-04 22:15:25 +0000
@@ -1707,6 +1707,12 @@
 
 ;;; 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))))
@@ -1754,7 +1760,7 @@
 
 (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"))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]