*** empty log message ***
[gnus] / lisp / gnus-msg.el
index 428c843..2f9afb4 100644 (file)
@@ -48,7 +48,7 @@ posting.")
 (defvar gnus-outgoing-message-group nil
   "*All outgoing messages will be put in this group.
 If you want to store all your outgoing mail and articles in the group
-\"nnml:archive\", you set this variable to that value. This variable
+\"nnml:archive\", you set this variable to that value.  This variable
 can also be a list of group names. 
 
 If you want to have greater control over what group to put each
@@ -81,6 +81,7 @@ of this message.  Please trim your Newsgroups header to exclude this
 group before posting in the future.
 
 Thank you.
+
 "
   "Format string to be inserted when complaining about crossposts.
 The first %s will be replaced by the Newsgroups header;
@@ -247,12 +248,12 @@ If prefix argument YANK is non-nil, original article is yanked automatically."
        (gnus-summary-select-article nil nil nil article)
        (gnus-summary-remove-process-mark article))
       (gnus-copy-article-buffer)
+      (message-goto-body)      
       (let ((message-reply-buffer gnus-article-copy)
            (message-reply-headers gnus-current-headers))
        (message-yank-original)
        (setq beg (or beg (mark t))))
       (when articles (insert "\n")))
-    
     (push-mark)
     (goto-char beg)))
 
@@ -308,20 +309,30 @@ header line with the old Message-ID."
       (save-excursion
        (set-buffer article-buffer)
        (save-restriction
+         ;; Copy over the (displayed) article buffer, delete
+         ;; hidden text and remove text properties.
          (widen)
-         (setq contents (format "%s" (buffer-string)))
+         (copy-to-buffer gnus-article-copy (point-min) (point-max))
+         (set-buffer gnus-article-copy)
+         (article-delete-text-of-type 'annotation)
+         (insert
+          (prog1
+              (format "%s" (buffer-string))
+            (erase-buffer)))
+         ;; Find the original headers.
          (set-buffer gnus-original-article-buffer)
          (goto-char (point-min))
          (while (looking-at message-unix-mail-delimiter)
            (forward-line 1))
          (setq beg (point))
          (setq end (or (search-forward "\n\n" nil t) (point)))
+         ;; Delete the headers from the displayed articles.
          (set-buffer gnus-article-copy)
-         (erase-buffer)
-         (insert contents)
          (delete-region (goto-char (point-min))
                         (or (search-forward "\n\n" nil t) (point)))
-         (insert-buffer-substring gnus-original-article-buffer beg end)))
+         ;; Insert the original article headers.
+         (insert-buffer-substring gnus-original-article-buffer beg end)
+         (article-decode-rfc1522)))
       gnus-article-copy)))
 
 (defun gnus-post-news (post &optional group header article-buffer yank subject
@@ -422,14 +433,8 @@ If SILENT, don't prompt the user."
                   (cons (or gnus-last-posting-server "") 0))))
          method-alist))))
      ;; Override normal method.
-     ((and gnus-post-method
-          (or (gnus-method-option-p group-method 'post)
-              (gnus-method-option-p group-method 'post-mail)))
+     (gnus-post-method
       gnus-post-method)
-     ;; Perhaps this is a mail group?
-     ((and (not (gnus-member-of-valid 'post group))
-          (not (gnus-method-option-p group-method 'post-mail)))
-      group-method)
      ;; Use the normal select method.
      (t gnus-select-method))))
 
@@ -581,7 +586,7 @@ If prefix argument YANK is non-nil, original article is yanked automatically."
   (gnus-summary-mail-forward t))
 
 (defvar gnus-nastygram-message 
-  "The following article was inappropriately posted to %s.\n"
+  "The following article was inappropriately posted to %s.\n\n"
   "Format string to insert in nastygrams.
 The current group name will be inserted at \"%s\".")
 
@@ -594,6 +599,7 @@ The current group name will be inserted at \"%s\".")
       (let ((group gnus-newsgroup-name))
        (gnus-summary-reply-with-original n)
        (set-buffer gnus-message-buffer)
+       (message-goto-body)
        (insert (format gnus-nastygram-message group))
        (message-send-and-exit))))
 
@@ -622,6 +628,7 @@ The current group name will be inserted at \"%s\".")
          (set-buffer gnus-summary-buffer)
          (gnus-summary-reply-with-original 1)
          (set-buffer gnus-message-buffer)
+         (message-goto-body)
          (insert (format gnus-crosspost-complaint newsgroups group))
          (when (gnus-y-or-n-p "Send this complaint? ")
            (message-send-and-exit)))))))
@@ -754,47 +761,39 @@ If YANK is non-nil, include the original article."
        (kill-buffer "*Gnus Help Bug*")))
 
 (defun gnus-debug ()
-  "Attemps to go through the Gnus source file and report what variables have been changed.
+  "Attempts to go through the Gnus source file and report what variables have been changed.
 The source file has to be in the Emacs load path."
   (interactive)
   (let ((files '("gnus-load.el" "gnus-sum.el" "gnus-group.el"
                 "gnus-art.el" "gnus-start.el"
-                "gnus-msg.el" "gnus-score.el"
+                "gnus-msg.el" "gnus-score.el" "gnus-win.el"
                 "nnmail.el" "message.el"))
-       file dirs expr olist sym)
+       file expr olist sym)
     (gnus-message 4 "Please wait while we snoop your variables...")
     (sit-for 0)
+    ;; Go through all the files looking for non-default values for variables.
     (save-excursion
       (set-buffer (get-buffer-create " *gnus bug info*"))
       (buffer-disable-undo (current-buffer))
       (while files
        (erase-buffer)
-       (setq dirs load-path)
-       (while dirs
-         (if (or (not (car dirs))
-                 (not (stringp (car dirs)))
-                 (not (file-exists-p 
-                       (setq file (concat (file-name-as-directory 
-                                           (car dirs)) (car files))))))
-             (setq dirs (cdr dirs))
-           (setq dirs nil)
-           (insert-file-contents file)
+       (when (file-exists-p (setq file (locate-library (pop files))))
+         (insert-file-contents file)
+         (goto-char (point-min))
+         (if (not (re-search-forward "^;;* *Internal variables" nil t))
+             (gnus-message 4 "Malformed sources in file %s" file)
+           (narrow-to-region (point-min) (point))
            (goto-char (point-min))
-           (if (not (re-search-forward "^;;* *Internal variables" nil t))
-               (gnus-message 4 "Malformed sources in file %s" file)
-             (narrow-to-region (point-min) (point))
-             (goto-char (point-min))
-             (while (setq expr (condition-case () 
-                                   (read (current-buffer)) (error nil)))
-               (condition-case ()
-                   (and (eq (car expr) 'defvar)
-                        (stringp (nth 3 expr))
-                        (or (not (boundp (nth 1 expr)))
-                            (not (equal (eval (nth 2 expr))
-                                        (symbol-value (nth 1 expr)))))
-                        (setq olist (cons (nth 1 expr) olist)))
-                 (error nil))))))
-       (setq files (cdr files)))
+           (while (setq expr (condition-case () 
+                                 (read (current-buffer)) (error nil)))
+             (condition-case ()
+                 (and (eq (car expr) 'defvar)
+                      (stringp (nth 3 expr))
+                      (or (not (boundp (nth 1 expr)))
+                          (not (equal (eval (nth 2 expr))
+                                      (symbol-value (nth 1 expr)))))
+                      (push (nth 1 expr) olist))
+               (error nil))))))
       (kill-buffer (current-buffer)))
     (when (setq olist (nreverse olist))
       (insert "------------------ Environment follows ------------------\n\n"))
@@ -815,7 +814,7 @@ The source file has to be in the Emacs load path."
       (setq olist (cdr olist)))
     (insert "\n\n")
     ;; Remove any null chars - they seem to cause trouble for some
-    ;; mailers. (Byte-compiled output from the stuff above.) 
+    ;; mailers.  (Byte-compiled output from the stuff above.) 
     (goto-char (point-min))
     (while (re-search-forward "[\000\200]" nil t)
       (replace-match "" t t))))
@@ -959,7 +958,7 @@ this is a reply."
          (insert "Gcc: ")
          (if (and gnus-newsgroup-name
                   (setq gcc-self-val
-                        (gnus-group-get-parameter
+                        (gnus-group-find-parameter
                          gnus-newsgroup-name 'gcc-self)))
              (progn 
                (insert