Sync up with Pteroductyl Gnus 0.62
[elisp/gnus.git-] / lisp / gnus-msg.el
index 96c6b66..6ee0f57 100644 (file)
@@ -230,8 +230,9 @@ Thank you for your help in stamping out bugs.
        `(lambda (arg)
           (gnus-post-method arg ,gnus-newsgroup-name)))
   (setq message-user-agent (gnus-extended-version))
-  (message-add-action
-   `(set-window-configuration ,winconf) 'exit 'postpone 'kill)
+  (when (not message-use-multi-frames)
+    (message-add-action
+     `(set-window-configuration ,winconf) 'exit 'postpone 'kill))
   (message-add-action
    `(when (gnus-buffer-exists-p ,buffer)
       (save-excursion
@@ -359,7 +360,8 @@ post using the current select method."
 This is done simply by taking the old article and adding a Supersedes
 header line with the old Message-ID."
   (interactive)
-  (let ((article (gnus-summary-article-number)))
+  (let ((article (gnus-summary-article-number))
+       (gnus-message-setup-hook '(gnus-maybe-setup-default-charset)))
     (gnus-setup-message 'reply-yank
       (gnus-summary-select-article t)
       (set-buffer gnus-original-article-buffer)
@@ -958,14 +960,15 @@ this is a reply."
   (interactive "P")
   (gnus-summary-select-article t)
   (set-buffer gnus-original-article-buffer)
-  (gnus-setup-message 'compose-bounce
-    (let* ((references (mail-fetch-field "references"))
-          (parent (and references (gnus-parent-id references))))
-      (message-bounce)
-      ;; If there are references, we fetch the article we answered to.
-      (and fetch parent
-          (gnus-summary-refer-article parent)
-          (gnus-summary-show-all-headers)))))
+  (let ((gnus-message-setup-hook '(gnus-maybe-setup-default-charset)))
+    (gnus-setup-message 'compose-bounce
+      (let* ((references (mail-fetch-field "references"))
+            (parent (and references (gnus-parent-id references))))
+       (message-bounce)
+       ;; If there are references, we fetch the article we answered to.
+       (and fetch parent
+            (gnus-summary-refer-article parent)
+            (gnus-summary-show-all-headers))))))
 
 ;;; Gcc handling.
 
@@ -1120,6 +1123,15 @@ this is a reply."
          (gnus-newsgroup-name (or gnus-newsgroup-name ""))
          style match variable attribute value value-value)
       (make-local-variable 'gnus-message-style-insertions)
+      ;; If the group has a posting-style parameter, add it at the end with a
+      ;; regexp matching everything, to be sure it takes precedence over all
+      ;; the others.
+      (unless (eq 0 (length gnus-newsgroup-name))
+       (let ((tmp-style (gnus-group-find-parameter gnus-newsgroup-name 
+                                                   'posting-style t)))
+         (and tmp-style
+              (setq styles (append styles (list (cons ".*" tmp-style)))))
+         ))
       ;; Go through all styles and look for matches.
       (while styles
        (setq style (pop styles)