Import No Gnus v0.4.
[elisp/gnus.git-] / lisp / nnnil.el
1 ;;; nnnil.el --- empty backend for Gnus
2 ;; Public domain.
3
4 ;; Author: Paul Jarc <prj@po.cwru.edu>
5
6 ;; GNU Emacs is free software; you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by
8 ;; the Free Software Foundation; either version 2, or (at your option)
9 ;; any later version.
10
11 ;; GNU Emacs is distributed in the hope that it will be useful,
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ;; GNU General Public License for more details.
15
16 ;; You should have received a copy of the GNU General Public License
17 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
18 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 ;; Boston, MA 02110-1301, USA.
20
21 ;;; Commentary:
22
23 ;; nnnil is a Gnus backend that provides no groups or articles.  It's useful
24 ;; as a primary select method when you want all your real select methods to
25 ;; be secondary or foreign.
26
27 ;;; Code:
28
29 (eval-and-compile
30   (require 'nnheader))
31
32 (defvar nnnil-status-string "")
33
34 (defun nnnil-retrieve-headers (articles &optional group server fetch-old)
35   (with-current-buffer nntp-server-buffer
36     (erase-buffer))
37   'nov)
38
39 (defun nnnil-open-server (server &optional definitions)
40   t)
41
42 (defun nnnil-close-server (&optional server)
43   t)
44
45 (defun nnnil-request-close ()
46   t)
47
48 (defun nnnil-server-opened (&optional server)
49   t)
50
51 (defun nnnil-status-message (&optional server)
52   nnnil-status-string)
53
54 (defun nnnil-request-article (article &optional group server to-buffer)
55   (setq nnnil-status-string "No such group")
56   nil)
57
58 (defun nnnil-request-group (group &optional server fast)
59   (let (deactivate-mark)
60     (save-excursion
61       (set-buffer nntp-server-buffer)
62       (erase-buffer)
63       (insert "411 no such news group\n")))
64   (setq nnnil-status-string "No such group")
65   nil)
66
67 (defun nnnil-close-group (group &optional server)
68   t)
69
70 (defun nnnil-request-list (&optional server)
71   (with-current-buffer nntp-server-buffer
72     (erase-buffer))
73   t)
74
75 (defun nnnil-request-post (&optional server)
76   (setq nnnil-status-string "Read-only server")
77   nil)
78
79 (provide 'nnnil)
80
81 ;;; arch-tag: a982a1a3-bc5e-4fb1-a233-d7657a3e3257