Synch to No Gnus 200409221307.
authoryamaoka <yamaoka>
Wed, 22 Sep 2004 13:08:00 +0000 (13:08 +0000)
committeryamaoka <yamaoka>
Wed, 22 Sep 2004 13:08:00 +0000 (13:08 +0000)
lisp/ChangeLog
lisp/gnus-win.el
lisp/mml.el

index 128943f..0666b9f 100644 (file)
@@ -1,5 +1,11 @@
 2004-09-22  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 2004-09-22  Katsumi Yamaoka  <yamaoka@jpl.org>
 
+       * gnus-win.el (gnus-buffer-configuration): Add mml-preview.
+       (gnus-window-to-buffer): Ditto.
+
+       * mml.el (mml-preview-buffer): New variable.
+       (mml-preview): Manage window layout with gnus-buffer-configuration.
+
        * gnus-msg.el (gnus-setup-message): Put article numbers into the
        X-Draft-From header even if those articles aren't quoted.
 
        * gnus-msg.el (gnus-setup-message): Put article numbers into the
        X-Draft-From header even if those articles aren't quoted.
 
index 0d578d7..b844893 100644 (file)
@@ -1,5 +1,5 @@
 ;;; gnus-win.el --- window configuration functions for Gnus
 ;;; gnus-win.el --- window configuration functions for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -165,7 +165,11 @@ used to display Gnus windows."
               (message 1.0 point)))
     (display-term
      (vertical 1.0
               (message 1.0 point)))
     (display-term
      (vertical 1.0
-              ("*display*" 1.0))))
+              ("*display*" 1.0)))
+    (mml-preview
+     (vertical 1.0
+              (message 0.5)
+              (mml-preview 1.0 point))))
   "Window configuration for all possible Gnus buffers.
 See the Gnus manual for an explanation of the syntax used.")
 
   "Window configuration for all possible Gnus buffers.
 See the Gnus manual for an explanation of the syntax used.")
 
@@ -193,7 +197,8 @@ See the Gnus manual for an explanation of the syntax used.")
     (info . gnus-info-buffer)
     (category . gnus-category-buffer)
     (article-copy . gnus-article-copy)
     (info . gnus-info-buffer)
     (category . gnus-category-buffer)
     (article-copy . gnus-article-copy)
-    (draft . gnus-draft-buffer))
+    (draft . gnus-draft-buffer)
+    (mml-preview . mml-preview-buffer))
   "Mapping from short symbols to buffer names or buffer variables.")
 
 (defcustom gnus-configure-windows-hook nil
   "Mapping from short symbols to buffer names or buffer variables.")
 
 (defcustom gnus-configure-windows-hook nil
index 634d4d5..603675b 100644 (file)
@@ -1,5 +1,5 @@
 ;;; mml.el --- A package for parsing and validating MML documents
 ;;; mml.el --- A package for parsing and validating MML documents
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -1078,10 +1078,15 @@ Should be adopted if code in `message-send-mail' is changed."
     (message-position-on-field "Mail-Followup-To" "X-Draft-From")
     (insert (message-make-mail-followup-to))))
 
     (message-position-on-field "Mail-Followup-To" "X-Draft-From")
     (insert (message-make-mail-followup-to))))
 
+(defvar mml-preview-buffer nil)
+
 (defun mml-preview (&optional raw)
   "Display current buffer with Gnus, in a new buffer.
 If RAW, don't highlight the article."
   (interactive "P")
 (defun mml-preview (&optional raw)
   "Display current buffer with Gnus, in a new buffer.
 If RAW, don't highlight the article."
   (interactive "P")
+  (setq mml-preview-buffer (generate-new-buffer
+                           (concat (if raw "*Raw MIME preview of "
+                                     "*MIME preview of ") (buffer-name))))
   (save-excursion
     (let* ((buf (current-buffer))
           (message-options message-options)
   (save-excursion
     (let* ((buf (current-buffer))
           (message-options message-options)
@@ -1093,11 +1098,9 @@ If RAW, don't highlight the article."
                                           (message-fetch-field "Newsgroups")))
                                        message-posting-charset)))
       (message-options-set-recipient)
                                           (message-fetch-field "Newsgroups")))
                                        message-posting-charset)))
       (message-options-set-recipient)
-      (pop-to-buffer (generate-new-buffer
-                     (concat (if raw "*Raw MIME preview of "
-                               "*MIME preview of ") (buffer-name))))
       (when (boundp 'gnus-buffers)
       (when (boundp 'gnus-buffers)
-       (push (current-buffer) gnus-buffers))
+       (push mml-preview-buffer gnus-buffers))
+      (set-buffer mml-preview-buffer)
       (erase-buffer)
       (insert-buffer-substring buf)
       (mml-preview-insert-mail-followup-to)
       (erase-buffer)
       (insert-buffer-substring buf)
       (mml-preview-insert-mail-followup-to)
@@ -1144,7 +1147,11 @@ If RAW, don't highlight the article."
                     (lambda (event)
                       (interactive "@e")
                       (widget-button-press (widget-event-point event) event)))
                     (lambda (event)
                       (interactive "@e")
                       (widget-button-press (widget-event-point event) event)))
-      (goto-char (point-min)))))
+      (goto-char (point-min))))
+  (if (and (boundp 'gnus-buffer-configuration)
+          (assq 'mml-preview gnus-buffer-configuration))
+      (gnus-configure-windows 'mml-preview)
+    (pop-to-buffer mml-preview-buffer)))
 
 (defun mml-validate ()
   "Validate the current MML document."
 
 (defun mml-validate ()
   "Validate the current MML document."