Testing.
[gnus] / contrib / nnir.el
index bd45472..0e3a5a6 100644 (file)
@@ -18,8 +18,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
 
 ;;; Setup Code:
 
-(defconst nnir-version "$Id: nnir.el,v 1.1 2003/09/30 21:19:01 kaig Exp $"
-  "Version of NNIR.")
-
 (require 'cl)
 (require 'nnoo)
 (require 'gnus-group)
 (eval-and-compile
   (require 'gnus-util))
 (eval-when-compile
-  (require 'nnimap))
+  (require 'nnimap)
+  (autoload 'read-kbd-macro "edmacro" nil t))
 
 (nnoo-declare nnir)
 (nnoo-define-basics nnir)
@@ -378,7 +376,8 @@ Add an entry here when adding a new search engine.")
 ;;; User Customizable Variables:
 
 (defgroup nnir nil
-  "Search nnmh and nnml groups in Gnus with Glimpse, freeWAIS-sf, or EWS.")
+  "Search nnmh and nnml groups in Gnus with Glimpse, freeWAIS-sf, or EWS."
+  :group 'gnus)
 
 ;; Mail backend.
 
@@ -691,7 +690,17 @@ that it is for Namazu, not Glimpse."
     'gnus-group-make-nnir-group))
 (add-hook 'gnus-group-mode-hook 'nnir-group-mode-hook)
 
-
+(defmacro nnir-group-server (group)
+  "Return the server for a foreign newsgroup GROUP.
+The returned format is as `gnus-server-to-method' needs it.  See
+`gnus-group-real-prefix' and `gnus-group-real-name'."
+  `(let ((gname ,group))
+     (if (string-match "^\\([^:]+\\):" gname)
+        (setq gname (match-string 1 gname))
+       nil)
+     (if (string-match "^\\([^+]+\\)\\+\\(.+\\)$" gname)
+        (format "%s:%s" (match-string 1 gname) (match-string 2 gname))
+       (concat gname ":"))))
 
 ;; Summary mode commands.
 
@@ -864,7 +873,7 @@ pairs (also vectors, actually)."
     (let ((artlist nil)
           (groupspec (cdr (assq 'group query)))
           (qstring (cdr (assq 'query query)))
-         (prefix (nnir-read-server-parm 'nnir-glimps-remove-prefix server))
+         (prefix (nnir-read-server-parm 'nnir-glimpse-remove-prefix server))
          artno dirnam)
       (when (and group groupspec)
         (error (concat "It does not make sense to use a group spec"
@@ -1193,7 +1202,7 @@ Tested with swish-e-2.0.1 on Windows NT 4.0."
                  (error "Missing parameter `nnir-swish-e-index-file'")))
             (additional-switches
              (nnir-read-server-parm
-              'nnir-swish++-additional-switches server))
+              'nnir-swish-e-additional-switches server))
             (cp-list `(,nnir-swish-e-program
                        nil             ; input from /dev/null
                        t               ; output
@@ -1485,17 +1494,6 @@ form 'backend:name'."
 ;;       (symbol-value key))
 ;;     ))
 
-(defmacro nnir-group-server (group)
-  "Returns the server for a foreign newsgroup in the format as gnus-server-to-method needs it. Compare to gnus-group-real-prefix and gnus-group-real-name."
-  `(let ((gname ,group))
-    (if (string-match "^\\([^:]+\\):" gname)
-       (setq gname (match-string 1 gname))
-      nil)
-    (if (string-match "^\\([^+]+\\)\\+\\(.+\\)$" gname)
-       (format "%s:%s" (match-string 1 gname) (match-string 2 gname))
-      (concat gname ":"))
-    ))
-
 (defun nnir-group-full-name (shortname server)
   "For the given group name, return a full Gnus group name.
 The Gnus backend/server information is added."
@@ -1556,3 +1554,5 @@ The Gnus backend/server information is added."
 
 ;; The end.
 (provide 'nnir)
+
+;;; arch-tag: 9b3fecf8-4397-4bbb-bf3c-6ac3cbbc6664