*** empty log message ***
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 08:59:41 +0000 (08:59 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 08:59:41 +0000 (08:59 +0000)
17 files changed:
lisp/ChangeLog
lisp/gnus-edit.el
lisp/gnus-kill.el
lisp/gnus-msg.el
lisp/gnus-nocem.el
lisp/gnus-score.el
lisp/gnus-soup.el
lisp/gnus-uu.el
lisp/gnus-vis.el
lisp/gnus.el
lisp/message.el
lisp/nndb.el [new file with mode: 0644]
lisp/nndoc.el
lisp/nnsoup.el
lisp/nntp.el
texi/ChangeLog
texi/gnus.texi

index ba1c451..447965c 100644 (file)
@@ -1,8 +1,109 @@
+Thu Apr 18 20:10:11 1996  Lars Magne Ingebrigtsen  <larsi@aegir.ifi.uio.no>
+
+       * gnus.el (gnus-summary-show-article): Stop page breaking when
+       given a prefix.
+
+       * gnus-vis.el (gnus-summary-make-menu-bar): Removed obsolete
+       functions. 
+
+       * gnus-msg.el (gnus-summary-reply): Pass on `broken-reply-to'.
+
+       * message.el (message-reply): Allow broken reply-to.
+
+       * gnus.el (gnus-group-jump-to-group): Refuse to treat groups that
+       have control characters in them.
+
+Thu Apr 18 18:47:16 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
+
+       * gnus-vis.el (gnus-button-url-regexp): Allow "!" in URLs.
+
+       * gnus.el (gnus-summary-exit): Always run
+       `gnus-summary-prepare-exit-hook'. 
+
+Thu Apr 18 12:15:27 1996  Lars Magne Ingebrigtsen  <larsi@trym.ifi.uio.no>
+
+       * gnus.el: September Gnus v0.74 is released.
+
+       * gnus.el (gnus-summary-update-mark): Would but out on eob.
+
+       * gnus-msg.el (gnus-post-method): Would bug out.
+
+Thu Apr 18 09:08:53 1996  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * gnus.el (gnus-get-newsgroup-headers-xover): Deleted duplicate
+       line. 
+
+Thu Apr 18 11:06:10 1996  Lars Magne Ingebrigtsen  <larsi@trym.ifi.uio.no>
+
+       * gnus.el (gnus-parse-headers-hook): Enable de-QP by default.
+
+Wed Apr 17 08:59:20 1996  Jan Vroonhof  <vroonhof@math.ethz.ch>
+
+       * gnus-nocem.el (gnus-nocem-enter-article): added some simple
+         error recovery for read calls on article content. 
+
+Wed Apr 17 00:51:19 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
+
+       * gnus.el (gnus-error): New function.
+
+       * nnsoup.el: Generate headers.
+
+Tue Apr 16 08:06:12 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
+
+       * message.el (message-user-mail-address): Use
+       `mail-extract-address-components'. 
+
+       * gnus.el (gnus-group-make-group): Use method history.
+       (gnus-group-browse-foreign-server): Ditto.
+       (gnus-ask-server-for-new-groups): Make sure symbols are bound.
+
+Tue Apr 16 00:07:47 1996  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * gnus.el (gnus-completing-read): New function.
+       (gnus-method-history): New variable.
+       (gnus-summary-respool-default-method): New user option.
+       (gnus-summary-respool-article): Use them.
+
+Tue Apr 16 07:36:18 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
+
+       * gnus.el (gnus-summary-mode): Make line format bufffer local. 
+
+Mon Apr 15 08:41:35 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
+
+       * gnus-vis.el (gnus-button-url-regexp): "-" was not in the regexp.
+
+       * nntp.el (nntp-open-server): Would choke on port numbers.
+
+       * gnus-soup.el (gnus-soup-send-packet): Insert
+       X-Newsreader/X-Mailer. 
+
+       * nntp.el (nntp-open-server-semi-internal): Clear the server
+       buffer. 
+
+Sun Apr 14 17:11:49 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
+
+       * gnus-msg.el (gnus-setup-message): Don't clobber
+       message-header-setup-hook. 
+
+       * nndoc.el (nndoc-type-alist): Would show end line in forwards.
+
+       * gnus.el (gnus-window-to-buffer): Allow `mail' value.
+
+       * message.el (message-send-mail): Would choke on Resent-to.
+       (message-generate-new-buffers): New variable.
+       (message-pop-to-buffer): Use it.
+       (message-kill-buffer-on-exit): New variable.
+       (message-send-and-exit): Use it.
+
 Sun Apr 14 08:54:37 1996  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
+       * gnus.el: September Gnus v0.73 is released.
+
        * message.el (message-mode): Mail-hist isn't defined in XEmacs
        19.13. 
 
+       * gnus.el: September Gnus v0.72 is released.
+
        * nnoo.el (defvoo): Didn't work under XEmacs.
 
 Sun Apr 14 06:27:19 1996  Lars Magne Ingebrigtsen  <larsi@aegir.ifi.uio.no>
index 1dbd859..9da3730 100644 (file)
@@ -605,7 +605,7 @@ groups matched by the current score file.")
     (gnus-score-load file)
     (setq gnus-score-custom-file file)
     (custom-reset-all)
-    (message "Loaded")))
+    (gnus-message 4 "Loaded")))
 
 (defun gnus-score-custom-save ()
   (interactive)
@@ -622,7 +622,7 @@ groups matched by the current score file.")
       (gnus-make-directory (file-name-directory file))
       (write-region (point-min) (point-max) file nil 'silent)
       (kill-buffer (current-buffer))))
-  (message "Saved"))
+  (gnus-message 4 "Saved"))
 
 (provide 'gnus-edit)
 
index 838c077..4e86360 100644 (file)
@@ -336,8 +336,8 @@ If NEWSGROUP is nil, return the global kill file instead."
   (cond ((file-exists-p (gnus-score-file-name gnus-newsgroup-name))
          ;; Ignores global KILL.
          (if (file-exists-p (gnus-newsgroup-kill-file gnus-newsgroup-name))
-             (message "Note: Ignoring %s.KILL; preferring .SCORE"
-                      gnus-newsgroup-name))
+             (gnus-message 3 "Note: Ignoring %s.KILL; preferring .SCORE"
+                            gnus-newsgroup-name))
          0)
         ((or (file-exists-p (gnus-newsgroup-kill-file nil))
              (file-exists-p (gnus-newsgroup-kill-file gnus-newsgroup-name)))
index 12a0021..0914b74 100644 (file)
@@ -128,7 +128,8 @@ the group.")
     `(let ((,winconf (current-window-configuration))
           (,buffer (current-buffer))
           (,article (and gnus-article-reply (gnus-summary-article-number)))
-          message-header-setup-hook)
+          (message-header-setup-hook
+           (copy-sequence message-header-setup-hook)))
        (add-hook 'message-header-setup-hook 'gnus-inews-insert-gcc)
        (add-hook 'message-header-setup-hook 'gnus-inews-insert-archive-gcc)
        ,@forms
@@ -344,7 +345,7 @@ If SILENT, don't prompt the user."
               (when gnus-post-method
                 (if (listp (car gnus-post-method))
                     gnus-post-method
-                  (listp gnus-post-method)))
+                  (list gnus-post-method)))
               gnus-secondary-select-methods
               (list gnus-select-method)
               (list group-method)))
@@ -501,7 +502,8 @@ If prefix argument YANK is non-nil, original article is yanked automatically."
     (gnus-setup-message (if yank 'reply-yank 'reply)
       (gnus-summary-select-article)
       (set-buffer (gnus-copy-article-buffer))
-      (message-reply)
+      (message-reply nil nil (gnus-group-get-parameter
+                             gnus-newsgroup-name 'broken-reply-to))
       (when yank
        (gnus-inews-yank-articles yank)))))
 
@@ -683,7 +685,7 @@ The source file has to be in the Emacs load path."
   (let ((files '("gnus.el" "gnus-msg.el" "gnus-score.el" "nnmail.el"
                 "message.el"))
        file dirs expr olist sym)
-    (message "Please wait while we snoop your variables...")
+    (gnus-message 4 "Please wait while we snoop your variables...")
     (sit-for 0)
     (save-excursion
       (set-buffer (get-buffer-create " *gnus bug info*"))
@@ -702,7 +704,7 @@ The source file has to be in the Emacs load path."
            (insert-file-contents file)
            (goto-char (point-min))
            (if (not (re-search-forward "^;;* *Internal variables" nil t))
-               (message "Malformed sources in file %s" file)
+               (gnus-message 4 "Malformed sources in file %s" file)
              (narrow-to-region (point-min) (point))
              (goto-char (point-min))
              (while (setq expr (condition-case () 
index ea8e740..2015889 100644 (file)
@@ -36,7 +36,7 @@
 (defvar gnus-nocem-issuers 
   '("Automoose-1" ; The CancelMoose[tm] on autopilot.
     "clewis@ferret.ocunix.on.ca;" ; Chris Lewis -- Canadian angel & despammer.
-    "jem@xpat.com;"  ; Jem -- Korean despammer.
+    "jem@xpat.com;"  ; John Milburn -- despammer in Korea.
     "red@redpoll.mrfs.oh.us (Richard E. Depew)" ; Spew/bincancel guy.
     )
   "*List of NoCeM issuers to pay attention to.")
       (narrow-to-region b (1+ (match-beginning 0)))
       (goto-char (point-min))
       (while (search-forward "\t" nil t)
-       (when (boundp (let ((obarray gnus-active-hashtb)) (read buf)))
+       (when (condition-case nil
+                 (boundp (let ((obarray gnus-active-hashtb)) (read buf)))
+               (error nil))
          (beginning-of-line)
          (while (= (following-char) ?\t)
            (forward-line -1))
index cca2c3b..36312d8 100644 (file)
@@ -2171,8 +2171,8 @@ The list is determined from the variable gnus-score-file-alist."
   (interactive)
   (setq gnus-score-default-fold (not gnus-score-default-fold))
   (if gnus-score-default-fold
-      (message "New score file entries will be case insensitive.")
-    (message "New score file entries will be case sensitive.")))
+      (gnus-message 1 "New score file entries will be case insensitive.")
+    (gnus-message 1 "New score file entries will be case sensitive.")))
 
 (provide 'gnus-score)
 
index 2a910e3..51b29ab 100644 (file)
@@ -345,13 +345,13 @@ If NOT-ALL, don't pack ticked articles."
     (or (file-directory-p dir)
        (gnus-make-directory dir))
     (setq gnus-soup-areas nil)
-    (message "Packing %s..." packer)
+    (gnus-message 4 "Packing %s..." packer)
     (if (zerop (call-process "sh" nil nil nil "-c" 
                             (concat "cd " dir " ; " packer)))
        (progn
          (call-process "sh" nil nil nil "-c" 
                        (concat "cd " dir " ; rm " files))
-         (message "Packing...done" packer))
+         (gnus-message 4 "Packing...done" packer))
       (error "Couldn't pack packet."))))
 
 (defun gnus-soup-parse-areas (file)
@@ -485,13 +485,13 @@ file. The vector contain three strings, [prefix name encoding]."
   "Unpack PACKET into DIR using UNPACKER.
 Return whether the unpacking was successful."
   (gnus-make-directory dir)
-  (message "Unpacking: %s" (format unpacker packet))
+  (gnus-message 4 "Unpacking: %s" (format unpacker packet))
   (prog1
       (zerop (call-process
              "sh" nil nil nil "-c"
              (format "cd %s ; %s" (expand-file-name dir) 
                      (format unpacker packet))))
-    (message "Unpacking...done")))
+    (gnus-message 4 "Unpacking...done")))
 
 (defun gnus-soup-send-packet (packet)
   (gnus-soup-unpack-packet 
@@ -533,14 +533,16 @@ Return whether the unpacking was successful."
              (search-forward "\n\n")
              (forward-char -1)
              (insert mail-header-separator)
+             (setq message-newsreader (setq message-mailer
+                                            (gnus-extended-version)))
              (cond 
               ((string= (gnus-soup-reply-kind (car replies)) "news")
-               (message "Sending news message to %s..."
-                        (mail-fetch-field "newsgroups"))
+               (gnus-message 5 "Sending news message to %s..."
+                             (mail-fetch-field "newsgroups"))
                (sit-for 1)
                (funcall message-send-news-function))
               ((string= (gnus-soup-reply-kind (car replies)) "mail")
-               (message "Sending mail to %s..."
+               (gnus-message 5 "Sending mail to %s..."
                         (mail-fetch-field "to"))
                (sit-for 1)
                (funcall message-send-mail-function))
@@ -551,7 +553,7 @@ Return whether the unpacking was successful."
            (delete-file (buffer-file-name))
            (kill-buffer msg-buf)
            (kill-buffer tmp-buf)
-           (message "Sent packet"))))
+           (gnus-message 4 "Sent packet"))))
        (setq replies (cdr replies)))
       t)))
                   
index f379f48..6809b5e 100644 (file)
@@ -708,7 +708,7 @@ The headers will be included in the sequence they are matched.")
          (when (or (not (file-exists-p to-file))
                    (gnus-y-or-n-p (format "%s exists; overwrite? " to-file)))
            (copy-file file to-file t t)))))
-    (message "Saved %d file%s" len (if (= len 1) "" "s"))))
+    (gnus-message 5 "Saved %d file%s" len (if (= len 1) "" "s"))))
 
 ;; Functions for saving and possibly digesting articles without
 ;; any decoding.
@@ -1147,8 +1147,8 @@ The headers will be included in the sequence they are matched.")
          (setq state 'last)))
 
       (let ((part (gnus-uu-part-number article)))
-       (message "Getting article %d%s..." 
-                article (if (string= part "") "" (concat ", " part))))
+       (gnus-message 6 "Getting article %d%s..." 
+                     article (if (string= part "") "" (concat ", " part))))
       (gnus-summary-display-article article)
       
       ;; Push the article to the processing function.
@@ -1224,7 +1224,7 @@ The headers will be included in the sequence they are matched.")
                   (memq 'middle process-state)))
          (progn
            (setq process-state (list 'error))
-           (message "No begin part at the beginning")
+           (gnus-message 2 "No begin part at the beginning")
            (sleep-for 2))
        (setq state 'middle)))
 
@@ -1233,12 +1233,12 @@ The headers will be included in the sequence they are matched.")
        (message "")
       (cond
        ((not has-been-begin)
-       (message "Wrong type file"))
+       (gnus-message 2 "Wrong type file"))
        ((memq 'error process-state)
-       (message "An error occurred during decoding"))
+       (gnus-message 2 "An error occurred during decoding"))
        ((not (or (memq 'ok process-state) 
                 (memq 'end process-state)))
-       (message "End of articles reached before end of file")))
+       (gnus-message 2 "End of articles reached before end of file")))
       ;; Make unsuccessfully decoded articles unread.
       (when gnus-uu-unmark-articles-not-decoded
        (while article-series
@@ -1352,7 +1352,7 @@ The headers will be included in the sequence they are matched.")
              (error 
               (progn 
                 (delete-process gnus-uu-uudecode-process)
-                (message "gnus-uu: Couldn't uudecode")
+                (gnus-message 2 "gnus-uu: Couldn't uudecode")
                 (setq state (list 'wrong-type)))))
 
            (if (memq 'end state)
@@ -1450,13 +1450,13 @@ The headers will be included in the sequence they are matched.")
       (set-buffer (get-buffer-create gnus-uu-output-buffer-name))
       (erase-buffer))
 
-    (message "Unpacking: %s..." (gnus-uu-command action file-path))
+    (gnus-message 5 "Unpacking: %s..." (gnus-uu-command action file-path))
 
     (if (= 0 (call-process "sh" nil 
                           (get-buffer-create gnus-uu-output-buffer-name)
                           nil "-c" command))
        (message "")
-      (message "Error during unpacking of archive")
+      (gnus-message 2 "Error during unpacking of archive")
       (setq did-unpack nil))
 
     (if (member action gnus-uu-destructive-archivers)
@@ -1488,7 +1488,7 @@ The headers will be included in the sequence they are matched.")
          (progn
            (setq did-unpack (cons file did-unpack))
            (or (gnus-uu-treat-archive file)
-               (message "Error during unpacking of %s" file))
+               (gnus-message 2 "Error during unpacking of %s" file))
            (let* ((newfiles (gnus-uu-ls-r gnus-uu-work-dir))
                   (nfiles newfiles))
              (gnus-uu-add-file newfiles)
index f0dcfc5..ada6f81 100644 (file)
 ;(defvar gnus-signature-face 'italic
 ;  "Face used for signature.")
 
-(defvar gnus-button-url-regexp "\\b\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[\\w-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]*[\\w-a-zA-Z0-9_=#$@~`%&*+|\\/]"
+(defvar gnus-button-url-regexp "\\b\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-\\wa-zA-Z0-9_=!?#$@~`%&*+|\\/.,]*[-\\wa-zA-Z0-9_=#$@~`%&*+|\\/]"
   "*Regular expression that matches URLs.")
 
 (defvar gnus-button-alist 
@@ -805,8 +805,6 @@ ticked: The number of ticked articles in the group.
        ["Resend message" gnus-summary-resend-message t]
        ["Send bounced mail" gnus-summary-resend-bounced-mail t]
        ["Send a mail" gnus-summary-mail-other-window t]
-       ["Reply & followup" gnus-summary-followup-and-reply t]
-       ["Reply & followup and yank" gnus-summary-followup-and-reply-with-original t]
        ["Uuencode and post" gnus-uu-post-news t]
        ("Draft"
        ["Send" gnus-summary-send-draft t]
@@ -1479,8 +1477,8 @@ specified by `gnus-button-alist'."
                  (fboundp (symbol-value fun)))
             (apply (symbol-value fun) args))
            (t
-            (message "You must define `%S' to use this button"
-                     (cons fun args)))))))
+            (gnus-message 1 "You must define `%S' to use this button"
+                          (cons fun args)))))))
 
 (defun gnus-button-message-id (message-id)
   "Fetch MESSAGE-ID."
index 6cff2e2..006cc7a 100644 (file)
@@ -949,6 +949,8 @@ buffer configuration.")
     (browse-carpal . gnus-carpal-browse-buffer)
     (edit-score . gnus-score-edit-buffer)
     (message . gnus-message-buffer)
+    (mail . gnus-message-buffer)
+    (post-news . gnus-message-buffer)
     (faq . gnus-faq-buffer)
     (picons . "*Picons*")
     (tree . gnus-tree-buffer)
@@ -1466,6 +1468,7 @@ is not run if `gnus-visual' is nil.")
 
 (defvar gnus-parse-headers-hook nil
   "*A hook called before parsing the headers.")
+(add-hook 'gnus-parse-headers-hook 'gnus-headers-decode-quoted-printable)
 
 (defvar gnus-exit-group-hook nil
   "*A hook called when exiting (not quitting) summary mode.")
@@ -1522,13 +1525,17 @@ It is called with three parameters -- GROUP, LEVEL and OLDLEVEL.")
            (remove-hook 'gnus-summary-prepare-hook
                         'hilit-rehighlight-buffer-quietly)
            (remove-hook 'gnus-summary-prepare-hook 'hilit-install-line-hooks)
-           (setq gnus-mark-article-hook '(gnus-summary-mark-read-and-unread-as-read))
+           (setq gnus-mark-article-hook
+                 '(gnus-summary-mark-read-and-unread-as-read))
            (remove-hook 'gnus-article-prepare-hook
                         'hilit-rehighlight-buffer-quietly)))
 
 \f
 ;; Internal variables
 
+(defvar gnus-method-history nil)
+;; Variable holding the user answers to all method prompts.
+
 (defvar gnus-server-alist nil
   "List of available servers.")
 
@@ -1695,7 +1702,7 @@ variable (string, integer, character, etc).")
   "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)"
   "The mail address of the Gnus maintainers.")
 
-(defconst gnus-version "September Gnus v0.73"
+(defconst gnus-version "September Gnus v0.75"
   "Version number for this version of Gnus.")
 
 (defvar gnus-info-nodes
@@ -3613,6 +3620,14 @@ simple-first is t, first argument is already simplified."
        (push group groups)))
     (nreverse groups)))
 
+(defun gnus-completing-read (default prompt &rest args)
+  ;; Like `completing-read', except that DEFAULT is the default argument.
+  (let* ((prompt (concat prompt " (default " default ") "))
+        (answer (apply 'completing-read prompt args)))
+    (if (or (null answer) (zerop (length answer)))
+       default
+      answer)))
+
 ;; Two silly functions to ensure that all `y-or-n-p' questions clear
 ;; the echo area.
 (defun gnus-y-or-n-p (prompt)
@@ -3677,6 +3692,17 @@ simple-first is t, first argument is already simplified."
     ;; from `message'.
     (apply 'format args)))
 
+(defun gnus-error (level &rest args)
+  "Beep an error if `gnus-verbose' is on LEVEL or less."
+  (when (<= (floor level) gnus-verbose)
+    (apply 'message args)
+    (ding)
+    (let (duration)
+      (when (and (floatp level)
+                (not (zerop (setq duration (* 10 (- level (floor level)))))))
+       (sit-for duration))))
+  nil)
+
 ;; Generate a unique new group name.
 (defun gnus-generate-new-group-name (leaf)
   (let ((name leaf)
@@ -5114,9 +5140,7 @@ Return nil if the group isn't displayed."
                             (substitute-command-keys
                              "\\<gnus-group-mode-map>\\[gnus-group-universal-argument]")))))
            'undefined)
-       (progn
-         (message "Undefined key")
-         (ding))
+       (gnus-error 1 "Undefined key")
       (while groups
        (gnus-group-remove-mark (setq group (pop groups)))
        (command-execute func))))
@@ -5253,8 +5277,11 @@ Returns whether the fetching was successful or not."
          "Group: " gnus-active-hashtb nil
          (memq gnus-select-method gnus-have-read-active-file))))
 
-  (if (equal group "")
-      (error "Empty group name"))
+  (when (equal group "")
+    (error "Empty group name"))
+
+  (when (string-match "[\000-\032]" group)
+    (error "Control characters in group: %s" group))
 
   (let ((b (text-property-any
            (point-min) (point-max)
@@ -5397,7 +5424,7 @@ ADDRESS."
     (let ((method
           (completing-read
            "Method: " (append gnus-valid-select-methods gnus-server-alist)
-           nil t)))
+           nil t nil 'gnus-method-history)))
       (cond ((assoc method gnus-valid-select-methods)
             (list method
                   (if (memq 'prompt-address
@@ -5458,9 +5485,7 @@ of the Earth\".    There is no undo."
          () ; Whew!
        (gnus-message 6 "Deleting group %s..." group)
        (if (not (gnus-request-delete-group group force))
-           (progn
-             (gnus-message 3 "Couldn't delete group %s" group)
-             (ding))
+           (gnus-error 3 "Couldn't delete group %s" group)
          (gnus-message 6 "Deleting group %s...done" group)
          (gnus-group-goto-group group)
          (gnus-group-kill-group 1 t)
@@ -5494,9 +5519,7 @@ of the Earth\".    There is no undo."
   (gnus-message 6 "Renaming group %s to %s..." group new-name)
   (prog1
       (if (not (gnus-request-rename-group group new-name))
-         (progn
-           (gnus-message 3 "Couldn't rename group %s to %s" group new-name)
-           (ding))
+         (gnus-error 3 "Couldn't rename group %s to %s" group new-name)
        ;; We rename the group internally by killing it...
        (gnus-group-goto-group group)
        (gnus-group-kill-group)
@@ -5621,7 +5644,7 @@ of the Earth\".    There is no undo."
                                    "etc/gnus-tut.txt"))))
        (setq path nil)))
     (if (not file)
-       (message "Couldn't find doc group")
+       (gnus-message 1 "Couldn't find doc group")
       (gnus-group-make-group
        (gnus-group-real-name name)
        (list 'nndoc "gnus-help"
@@ -6364,8 +6387,7 @@ If N is negative, this group and the N-1 previous groups will be checked."
            (unless (gnus-virtual-group-p group)
              (gnus-close-group group))
            (gnus-group-update-group group))
-       (ding)
-       (gnus-message 3 "%s error: %s" group (gnus-status-message group))))
+       (gnus-error 3 "%s error: %s" group (gnus-status-message group))))
     (when beg (goto-char beg))
     (when gnus-goto-next-group-when-activating
       (gnus-group-next-unread-group 1 t))
@@ -6407,7 +6429,7 @@ If N is negative, this group and the N-1 previous groups will be checked."
                   gnus-description-hashtb))
             (setq desc (gnus-group-get-description group))
             (gnus-read-descriptions-file method))
-        (message
+        (gnus-message 1
          (or desc (gnus-gethash group gnus-description-hashtb)
              "No description available")))))
 
@@ -6679,7 +6701,7 @@ and the second element is the address."
    (list (let ((how (completing-read
                     "Which backend: "
                     (append gnus-valid-select-methods gnus-server-alist)
-                    nil t (cons "nntp" 0))))
+                    nil t (cons "nntp" 0) 'gnus-method-history)))
           ;; We either got a backend name or a virtual server name.
           ;; If the first, we also need an address.
           (if (assoc how gnus-valid-select-methods)
@@ -7035,6 +7057,8 @@ The following commands are available:
   (setq selective-display-ellipses t)  ;Display `...'
   (setq buffer-display-table gnus-summary-display-table)
   (setq gnus-newsgroup-name group)
+  (make-local-variable 'gnus-summary-line-format)
+  (make-local-variable 'gnus-summary-line-format-spec)
   (run-hooks 'gnus-summary-mode-hook))
 
 (defun gnus-summary-make-display-table ()
@@ -9143,8 +9167,6 @@ list of headers that match SEQUENCE (see `nntp-retrieve-headers')."
       (set-buffer nntp-server-buffer)
       ;; Allow the user to mangle the headers before parsing them.
       (run-hooks 'gnus-parse-headers-hook)
-      ;; Allow the user to mangle the headers before parsing them.
-      (run-hooks 'gnus-parse-headers-hook)
       (goto-char (point-min))
       (while (and sequence (not (eobp)))
        (setq number (read cur))
@@ -9203,8 +9225,7 @@ list of headers that match SEQUENCE (see `nntp-retrieve-headers')."
                 (gnus-nov-field))      ; misc
               ))
       (error (progn
-              (ding)
-              (gnus-message 4 "Strange nov line")
+              (gnus-error 4 "Strange nov line")
               (setq header nil)
               (goto-char eol))))
 
@@ -9600,9 +9621,7 @@ displayed, no centering will be performed."
             "\\<gnus-summary-mode-map>\\[gnus-summary-universal-argument]"
             ))))
         'undefined)
-       (progn
-         (message "Undefined key")
-         (ding))
+       (gnus-error 1 "Undefined key")
       (save-excursion
        (while articles
          (gnus-summary-goto-subject (setq article (pop articles)))
@@ -9689,8 +9708,7 @@ gnus-exit-group-hook is called with no arguments if that value is non-nil."
         (quit-config (gnus-group-quit-config gnus-newsgroup-name))
         (mode major-mode)
         (buf (current-buffer)))
-    (unless temporary
-      (run-hooks 'gnus-summary-prepare-exit-hook))
+    (run-hooks 'gnus-summary-prepare-exit-hook)
     ;; If we have several article buffers, we kill them at exit.
     (unless gnus-single-article-buffer
       (gnus-kill-buffer gnus-article-buffer)
@@ -11073,6 +11091,7 @@ article massaging functions being run."
     (let ((gnus-have-all-headers t)
          gnus-article-display-hook
          gnus-article-prepare-hook
+         gnus-break-pages
          gnus-visual)
       (gnus-summary-select-article nil 'force)))
 ;  (gnus-configure-windows 'article)
@@ -11347,6 +11366,10 @@ re-spool using this method."
   (interactive "P")
   (gnus-summary-move-article n nil nil 'crosspost))
 
+(defvar gnus-summary-respool-default-method nil
+  "Default method for respooling an article.  
+If nil, use to the current newsgroup method.")
+
 (defun gnus-summary-respool-article (&optional n method)
   "Respool the current article.
 The article will be squeezed through the mail spooling process again,
@@ -11365,12 +11388,13 @@ latter case, they will be copied into the relevant groups."
    (list current-prefix-arg
         (let* ((methods (gnus-methods-using 'respool))
                (methname
-                (symbol-name (car (gnus-find-method-for-group
-                                   gnus-newsgroup-name))))
+                (symbol-name (or gnus-summary-respool-default-method
+                                 (car (gnus-find-method-for-group
+                                       gnus-newsgroup-name)))))
                (method
-                (completing-read
-                 "What backend do you want to use when respooling? "
-                 methods nil t (cons methname 0)))
+                (gnus-completing-read 
+                 methname "What backend do you want to use when? "
+                 methods nil t nil 'gnus-method-history))
                ms)
           (cond
            ((zerop (length (setq ms (gnus-servers-using-backend method))))
@@ -11546,9 +11570,8 @@ groups."
   (if (gnus-group-read-only-p)
       (progn
        (gnus-summary-edit-article-postpone)
-       (gnus-message
-        1 "The current newsgroup does not support article editing.")
-       (ding))
+       (gnus-error
+        1 "The current newsgroup does not support article editing."))
     (let ((buf (format "%s" (buffer-string))))
       (erase-buffer)
       (insert buf)
@@ -11627,7 +11650,7 @@ groups."
   "Return the score of the current article."
   (interactive)
   (gnus-set-global-variables)
-  (message "%s" (gnus-summary-article-score)))
+  (gnus-message 1 "%s" (gnus-summary-article-score)))
 
 ;; Summary marking commands.
 
@@ -11981,9 +12004,10 @@ marked."
   (beginning-of-line)
   (let ((forward (cdr (assq type gnus-summary-mark-positions)))
        (buffer-read-only nil))
-    (when forward
+    (when (and forward
+              (<= (+ forward (point)) (point-max)))
       ;; Go to the right position on the line.
-      (forward-char forward)
+      (goto-char (+ forward (point)))
       ;; Replace the old mark with the new mark.
       (subst-char-in-region (point) (1+ (point)) (following-char) mark)
       ;; Optionally update the marks by some user rule.
@@ -12374,8 +12398,8 @@ is non-nil or the Subject: of both articles are the same."
        (set-buffer gnus-summary-buffer)
        (gnus-summary-unmark-all-processable)
        (gnus-summary-rethread-current)
-       (message "Article %d is now the child of article %d."
-                current-article parent-article)))))
+       (gnus-message 3 "Article %d is now the child of article %d."
+                     current-article parent-article)))))
 
 (defun gnus-summary-toggle-threads (&optional arg)
   "Toggle showing conversation threads.
@@ -13491,10 +13515,8 @@ If ALL-HEADERS is non-nil, no headers are hidden."
                (setq gnus-current-article article)
                (gnus-summary-mark-article article gnus-canceled-mark))
              (unless (memq article gnus-newsgroup-sparse)
-               (gnus-message
-                1 "No such article (may have expired or been canceled)")
-               (ding)
-               nil))
+               (gnus-error
+                1 "No such article (may have expired or been canceled)")))
          (if (or (eq result 'pseudo) (eq result 'nneething))
              (progn
                (save-excursion
@@ -14675,11 +14697,8 @@ If CONFIRM is non-nil, the user will be asked for an NNTP server."
         "%s (%s) open error: '%s'.     Continue? "
         (car gnus-select-method) (cadr gnus-select-method)
         (gnus-status-message gnus-select-method)))
-       (progn
-        (gnus-message 1 "Couldn't open server on %s"
-                      (nth 1 gnus-select-method))
-        (ding)
-        nil)))))
+       (gnus-error 1 "Couldn't open server on %s"
+                  (nth 1 gnus-select-method))))))
 
 (defun gnus-check-group (group)
   "Try to make sure that the server where GROUP exists is alive."
@@ -15220,6 +15239,7 @@ the server for new groups."
       (mapatoms
        (lambda (group-sym)
         (if (or (null (setq group (symbol-name group-sym)))
+                (not (boundp group-sym))
                 (null (symbol-value group-sym))
                 (gnus-gethash group gnus-newsrc-hashtb)
                 (member group gnus-zombie-list)
@@ -15805,22 +15825,18 @@ Returns whether the updating was successful."
                  (setq list-type (gnus-retrieve-groups groups method))
                  (cond
                   ((not list-type)
-                   (gnus-message
-                    1 "Cannot read partial active file from %s server."
-                    (car method))
-                   (ding)
-                   (sit-for 2))
+                   (gnus-error
+                    1.2 "Cannot read partial active file from %s server."
+                    (car method)))
                   ((eq list-type 'active)
                    (gnus-active-to-gnus-format method gnus-active-hashtb))
                   (t
                    (gnus-groups-to-gnus-format method gnus-active-hashtb))))))
             (t
              (if (not (gnus-request-list method))
-                 (progn
-                   (unless (equal method gnus-message-archive-method)
-                     (gnus-message 1 "Cannot read active file from %s server."
-                                   (car method))
-                     (ding)))
+                 (unless (equal method gnus-message-archive-method)
+                   (gnus-error 1 "Cannot read active file from %s server."
+                               (car method)))
                (gnus-active-to-gnus-format method)
                ;; We mark this active file as read.
                (push method gnus-have-read-active-file)
@@ -16028,8 +16044,7 @@ If FORCE is non-nil, the .newsrc file is read."
       (condition-case nil
          (load ding-file t t t)
        (error
-        (gnus-message 1 "Error in %s" ding-file)
-        (ding)))
+        (gnus-error 1 "Error in %s" ding-file)))
       (when gnus-newsrc-assoc
        (setq gnus-newsrc-alist gnus-newsrc-assoc)))
     (gnus-make-hashtable-from-newsrc-alist)
@@ -16218,11 +16233,9 @@ If FORCE is non-nil, the .newsrc file is read."
                  (progn
                    ;; The line was buggy.
                    (setq group nil)
-                   (gnus-message 3 "Mangled line: %s"
-                                 (buffer-substring (gnus-point-at-bol)
-                                                   (gnus-point-at-eol)))
-                   (ding)
-                   (sit-for 1)))
+                   (gnus-error 3.1 "Mangled line: %s"
+                               (buffer-substring (gnus-point-at-bol)
+                                                 (gnus-point-at-eol)))))
              nil))
          ;; Skip past ", ".  Spaces are illegal in these ranges, but
          ;; we allow them, because it's a common mistake to put a
@@ -16513,9 +16526,7 @@ If FORCE is non-nil, the .newsrc file is read."
                    (eval-buffer (current-buffer))
                    t)
                (error
-                (gnus-message 3 "Possible error in %s" file)
-                (ding)
-                (sit-for 2)
+                (gnus-error 3.2 "Possible error in %s" file)
                 nil))
              (or gnus-slave ; Slaves shouldn't delete these files.
                  (condition-case ()
index 50c26bc..acc97eb 100644 (file)
@@ -124,6 +124,14 @@ any confusion.")
   "Non-nil means when sending a message wait for and display errors.
 nil means let mailer mail back a message to report errors.")
 
+;;;###autoload
+(defvar message-generate-new-buffers nil
+  "*Non-nil means that a new message buffer will be created whenever `mail-setup' is called.")
+
+;;;###autoload
+(defvar message-kill-buffer-on-exit nil
+  "*Non-nil means that the message buffer will be killed after sending a message.")
+
 (defvar gnus-local-organization)
 ;;;###autoload
 (defvar message-user-organization 
@@ -956,9 +964,11 @@ The text will also be indented the normal way."
   (let ((buf (current-buffer)))
     (when (and (message-send arg)
               (buffer-name buf))
-      (bury-buffer buf)
-      (when (eq buf (current-buffer))
-       (message-bury buf)))))
+      (if message-kill-buffer-on-exit
+         (kill-buffer buf)
+       (bury-buffer buf)
+       (when (eq buf (current-buffer))
+         (message-bury buf))))))
 
 (defun message-dont-send ()
   "Don't send the message you have been editing."
@@ -1030,11 +1040,11 @@ the user from the mailer."
        (tembuf (generate-new-buffer " message temp"))
        (case-fold-search nil)
        (news (message-news-p))
-       (resend-to-addresses (mail-fetch-field "resent-to"))
-       delimline
+       resend-to-addresses delimline
        (mailbuf (current-buffer)))
     (save-restriction
       (message-narrow-to-headers)
+      (setq resend-to-addresses (mail-fetch-field "resent-to"))
       ;; Insert some headers.
       (message-generate-headers message-required-mail-headers)
       ;; Let the user do all of the above.
@@ -1623,10 +1633,8 @@ give as trustworthy answer as possible."
 
 (defun message-user-mail-address ()
   "Return the pertinent part of `user-mail-address'."
-  (when (string-match
-        "\\(\\`\\|[ <\t]\\)\\([^ \t@]+@[^ \t]+\\)\\(\\'\\|[> \t]\\)" 
-        user-mail-address)
-    (match-string 2 user-mail-address)))
+  (when user-mail-address
+    (nth 1 (mail-extract-address-components user-mail-address))))
 
 (defun message-make-fqdm ()
   "Return user's fully qualified domain name."
@@ -1838,18 +1846,20 @@ Headers already prepared in the buffer are not modified."
 
 (defun message-pop-to-buffer (name)
   "Pop to buffer NAME, and warn if it already exists and is modified."
-  (let ((buffer (get-buffer name)))
-    (if (and buffer
-            (buffer-name buffer))
-       (progn
-         (set-buffer (pop-to-buffer buffer))
-         (when (and (buffer-modified-p)
-                    (not (y-or-n-p
-                          "Message already being composed; erase? ")))
-           (error "Message being composed")))
-      (set-buffer (pop-to-buffer name)))
-    (erase-buffer)
-    (message-mode)))
+  (if message-generate-new-buffers
+      (set-buffer (pop-to-buffer (generate-new-buffer name)))
+    (let ((buffer (get-buffer name)))
+      (if (and buffer
+              (buffer-name buffer))
+         (progn
+           (set-buffer (pop-to-buffer buffer))
+           (when (and (buffer-modified-p)
+                      (not (y-or-n-p
+                            "Message already being composed; erase? ")))
+             (error "Message being composed")))
+       (set-buffer (pop-to-buffer name)))))
+  (erase-buffer)
+  (message-mode))
 
 (defun message-setup (headers &optional replybuffer actions)
   (setq message-send-actions actions)
@@ -1934,7 +1944,7 @@ Headers already prepared in the buffer are not modified."
                   (Subject . ,(or subject "")))))
 
 ;;;###autoload
-(defun message-reply (&optional to-address wide)
+(defun message-reply (&optional to-address wide ignore-reply-to)
   "Start editing a reply to the article in the current buffer."
   (interactive)
   (let ((cur (current-buffer))
@@ -1965,7 +1975,7 @@ Headers already prepared in the buffer are not modified."
            to (mail-fetch-field "to")
            cc (mail-fetch-field "cc")
            mct (mail-fetch-field "mail-copies-to")
-           reply-to (mail-fetch-field "reply-to")
+           reply-to (unless ignore-reply-to (mail-fetch-field "reply-to"))
            references (mail-fetch-field "references")
            message-id (mail-fetch-field "message-id"))
       ;; Remove any (buggy) Re:'s that are present and make a
@@ -2086,13 +2096,14 @@ Headers already prepared in the buffer are not modified."
            (cond 
             ((equal (downcase followup-to) "poster")
              (if (or (eq message-use-followup-to 'use)
-                     (y-or-n-p "Use Followup-To \"poster\"? "))
+                     (yes-or-no-p "Use Followup-To \"poster\"? "))
                  (cons 'To (or reply-to from ""))
                (cons 'Newsgroups newsgroups)))
             (t
              (if (or (equal followup-to newsgroups)
                      (not (eq message-use-followup-to 'ask))
-                     (y-or-n-p (format "Use Followup-To %s? " followup-to)))
+                     (yes-or-no-p 
+                      (format "Use Followup-To %s? " followup-to)))
                  (cons 'Newsgroups followup-to)
                (cons 'Newsgroups newsgroups))))))
          (t
diff --git a/lisp/nndb.el b/lisp/nndb.el
new file mode 100644 (file)
index 0000000..3dd8de6
--- /dev/null
@@ -0,0 +1,234 @@
+;;; nndb.el --- nndb access for Gnus
+;; Copyright (C) 1996 Free Software Foundation, Inc.
+
+;; Author: Kai Grossjohann <grossjohann@ls6.informatik.uni-dortmund.de>
+;; Keywords: news
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; 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.
+
+;;; Commentary:
+
+;; I have shamelessly snarfed the code of nntp.el from sgnus.
+;;              Kai
+
+
+;;-
+;; Register nndb with known select methods.
+
+(setq gnus-valid-select-methods
+      (cons '("nndb" mail address respool prompt-address)
+            gnus-valid-select-methods))
+
+
+;;; Code:
+
+(require 'rnews)
+(require 'sendmail)
+(require 'nnheader)
+(require 'nntp)
+(eval-when-compile (require 'cl))
+
+(eval-and-compile
+  (unless (fboundp 'open-network-stream)
+    (require 'tcp)))
+
+(eval-when-compile (require 'cl))
+
+(eval-and-compile
+  (autoload 'news-setup "rnewspost")
+  (autoload 'news-reply-mode "rnewspost")
+  (autoload 'cancel-timer "timer")
+  (autoload 'telnet "telnet" nil t)
+  (autoload 'telnet-send-input "telnet" nil t)
+  (autoload 'timezone-parse-date "timezone"))
+
+;; Declare nndb as derived from nntp
+
+(nnoo-declare nndb nntp)
+
+;; Variables specific to nndb
+
+;;- currently not used but just in case...
+(defvoo nndb-deliver-program "nndel"
+  "*The program used to put a message in an NNDB group.")
+
+;; Variables copied from nntp
+
+(defvoo nndb-server-opened-hook '(nntp-send-authinfo-from-file)
+  "Like nntp-server-opened-hook."
+  nntp-server-opened-hook)
+
+;(defvoo nndb-rlogin-parameters '("telnet" "${NNDBSERVER:=localhost}" "9000")
+;  "*Parameters to nndb-open-login.  Like nntp-rlogin-parameters."
+;  nntp-rlogin-parameters)
+
+;(defvoo nndb-rlogin-user-name nil
+;  "*User name for rlogin connect method."
+;  nntp-rlogin-user-name)
+
+(defvoo nndb-address "localhost"
+  "*The name of the NNDB server."
+  nntp-address)
+
+(defvoo nndb-port-number 9000
+  "*Port number to connect to."
+  nntp-port-number)
+
+;(defvoo nndb-current-group ""
+;  "Like nntp-current-group."
+;  nntp-current-group)
+
+(defvoo nndb-status-string nil "" nntp-status-string)
+
+\f
+
+(defconst nndb-version "nndb 0.3"
+  "Version numbers of this version of NNDB.")
+
+\f
+;;; Interface functions.
+
+(nnoo-define-basics nndb)
+
+;;- maybe this should be mail??
+;;-(defun nndb-request-type (group &optional article)
+;;-  'news)
+
+;;------------------------------------------------------------------
+;;- only new stuff below
+
+; nndb-request-update-info does not exist and is not needed
+
+; nndb-request-update-mark does not exist and is not needed
+
+; nndb-request-scan does not exist
+; get new mail from somewhere -- maybe this is not needed?
+; --> todo
+
+(deffoo nndb-request-create-group (group &optional server)
+  "Creates a group if it doesn't exist yet."
+  (nntp-send-command "^[23].*\n" "MKGROUP" group))
+
+; todo -- use some other time than the creation time of the article
+; best is time since article has been marked as expirable
+(deffoo nndb-request-expire-articles
+  (articles &optional group server force)
+  "Expires ARTICLES from GROUP on SERVER.
+If FORCE, delete regardless of exiration date, otherwise use normal
+expiry mechanism."
+  (let (msg)
+    (nntp-possibly-change-server group server) ;;-
+    (while articles
+      (setq art (pop articles))
+      (nntp-send-command "^\\([23]\\|^423\\).*\n" "DATE" art)
+      (setq msg (nndb-status-message))
+      ;; CCC we shouldn't be using the variable nndb-status-string?
+      (if (string-match "^423" (nnheader-get-report 'nndb))
+          ()
+        (or (string-match "\\([0-9]+\\) \\([0-9]+\\)$" msg)
+            (error "Not a valid response for DATE command: %s"
+                   msg))
+        (if (nnmail-expired-article-p
+             group
+             (list (string-to-int
+                    (substring msg (match-beginning 1) (match-end 1)))
+                   (string-to-int
+                    (substring msg (match-beginning 2) (match-end 2))))
+             force)
+            (nnheader-message 5 "Deleting article %s in %s..."
+                              art group)
+          (nntp-send-command "^[23].*\n" "DELETE" art))))))
+
+(deffoo nndb-request-move-article
+  (article group server accept-form &optional last)
+  "Move ARTICLE (a number) from GROUP on SERVER.
+Evals ACCEPT-FORM in current buffer, where the article is.
+Optional LAST is ignored."
+  (let ((artbuf (get-buffer-create " *nndb move*")))
+    (and
+     (nndb-request-article article group server artbuf)
+     (save-excursion
+       (set-buffer artbuf)
+       (setq result (eval accept-form))
+       (kill-buffer (current-buffer))
+       result)
+     (nndb-request-expire-articles (list article)
+                                   group
+                                   server
+                                   t))
+    result))
+  
+(deffoo nndb-request-accept-article (group server &optional last)
+  "The article in the current buffer is put into GROUP."
+  (nntp-possibly-change-server group server) ;;-
+  (let (art statmsg)
+    (when (nntp-send-command "^[23].*\r?\n" "ACCEPT" group)
+      (nnheader-insert "")
+      (nntp-encode-text)
+      (nntp-send-region-to-server (point-min) (point-max))
+      ;; 1.2a NNTP's post command is buggy. "^M" (\r) is not
+      ;;  appended to end of the status message.
+      (nntp-wait-for-response "^[23].*\n")
+      (setq statmsg (nntp-status-message))
+      (or (string-match "^\\([0-9]+\\)" statmsg)
+          (error "nndb: %s" statmsg))
+      (setq art (substring statmsg
+                           (match-beginning 1)
+                           (match-end 1)))
+      (message "nndb: accepted %s" art)
+      (list art))))
+
+(deffoo nndb-request-replace-article (article group buffer)
+  "ARTICLE is the number of the article in GROUP to be replaced 
+with the contents of the BUFFER."
+  (set-buffer buffer)
+  (let (art statmsg)
+    (when (nntp-send-command "^[23].*\r?\n" "REPLACE" (int-to-string article))
+      (nnheader-insert "")
+      (nntp-encode-text)
+      (nntp-send-region-to-server (point-min) (point-max))
+      ;; 1.2a NNTP's post command is buggy. "^M" (\r) is not
+      ;;  appended to end of the status message.
+      (nntp-wait-for-response "^[23].*\n")
+;      (setq statmsg (nntp-status-message))
+;      (or (string-match "^\\([0-9]+\\)" statmsg)
+;          (error "nndb: %s" statmsg))
+;      (setq art (substring statmsg
+;                           (match-beginning 1)
+;                           (match-end 1)))
+;      (message "nndb: replaced %s" art)
+      (list (int-to-string article)))))
+
+; nndb-request-delete-group does not exist
+; todo -- maybe later
+
+; nndb-request-rename-group does not exist
+; todo -- maybe later
+
+;; Import stuff from nntp
+
+
+
+;; Import other stuff from nntp as is.
+
+(nnoo-import nndb
+  (nntp))
+(provide 'nndb)
+
+
index 0623038..126eed6 100644 (file)
@@ -66,7 +66,7 @@ One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
      (head-begin . "^[0-9].*\n"))
     (forward
      (article-begin . "^-+ Start of forwarded message -+\n+")
-     (body-end . "^-+ End of forwarded message -+\n")
+     (body-end . "^-+ End of forwarded message -+$")
      (prepare-body . nndoc-unquote-dashes))
     (clari-briefs
      (article-begin . "^ \\*")
index c9ae095..24f3570 100644 (file)
@@ -608,7 +608,10 @@ The SOUP packet file name will be inserted at the %s.")
          (save-restriction
            (message-narrow-to-headers)
            ;; Remove some headers.
-           (message-remove-header message-ignored-mail-headers t))
+           (message-remove-header message-ignored-mail-headers t)
+           (if (equal kind "mail")
+               (message-generate-headers message-required-mail-headers)
+             (message-generate-headers message-required-news-headers)))
          (goto-char (point-max))
          ;; require one newline at the end.
          (or (= (preceding-char) ?\n)
index c3a0c5e..5d6a708 100644 (file)
@@ -343,14 +343,15 @@ instead use `nntp-server-buffer'.")
   "Open the virtual server SERVER.
 If CONNECTIONLESS is non-nil, don't attempt to connect to any physical
 servers."
+  ;; Called with just a port number as the defs.
+  (when (or (stringp (car defs))
+           (numberp (car defs)))
+    (setq defs `((nntp-port-number ,(car defs)))))
+  (unless (assq 'nntp-address defs)
+    (setq defs (append defs `((nntp-address ,server)))))
   (nnoo-change-server 'nntp server defs)
   (if (nntp-server-opened server)
       t
-    (if (or (stringp (car defs))
-           (numberp (car defs)))
-       (setq defs (cons (list 'nntp-port-number (car defs)) (cdr defs))))
-    (or (assq 'nntp-address defs)
-       (setq defs (append defs (list (list 'nntp-address server)))))
     (or (nntp-server-opened server)
        connectionless
        (prog2
@@ -383,11 +384,11 @@ servers."
          (error nil))
        (delete-process proc)))
     (and nntp-async-buffer
-        (get-buffer nntp-async-buffer)
+        (buffer-name nntp-async-buffer)
         (kill-buffer nntp-async-buffer))
     (let ((alist (cddr (assq 'nntp nnoo-state-alist))))
       (while (setq entry (pop alist))
-       (and (setq proc (nth 1 (assq 'nntp-async-buffer entry)))
+       (and (setq proc (cdr (assq 'nntp-async-buffer entry)))
             (buffer-name proc)
             (kill-buffer proc))))
     (nnoo-close-server 'nntp)
@@ -1068,6 +1069,7 @@ It will prompt for a password."
   "Open SERVER.
 If SERVER is nil, use value of environment variable `NNTPSERVER'.
 If SERVICE, this this as the port number."
+  (nnheader-insert "")
   (let ((server (or server (getenv "NNTPSERVER")))
        (status nil)
        (timer 
index 9f36aed..6058033 100644 (file)
@@ -1,3 +1,7 @@
+Wed Apr 17 19:10:17 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
+
+       * gnus.texi (posting): Update to use message.
+
 Sat Apr 13 13:53:34 1996  Lars Magne Ingebrigtsen  <lars@eyesore.no>
 
        * gnus.texi (Writing New Backends): New node.
index aa3d88b..53d3267 100644 (file)
@@ -7287,7 +7287,7 @@ Save to different groups based on what group you are in:
 More complex stuff:
 @lisp
 (setq gnus-message-archive-group 
-      '((if (eq major-mode news-reply-mode) 
+      '((if (message-news-p)
             "misc-news" 
           "misc-mail")))
 @end lisp       
@@ -7299,7 +7299,7 @@ messages in one file per month:
 
 @lisp
 (setq gnus-message-archive-group
-      '((if (eq major-mode news-reply-mode) 
+      '((if (message-news-p)
             "misc-news" 
           (concat "mail." (format-time-string 
                            "%Y-%m" (current-time))))))