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-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>
(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.")
(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
;;; 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>
(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")
+ (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)
(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)
- (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)
(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."