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