From: yamaoka Date: Mon, 31 Oct 2005 06:15:59 +0000 (+0000) Subject: Synch to No Gnus 200510310615. X-Git-Tag: t-gnus-6_17_4-quimby-~267 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=9869d141b505b8bd9688184425ab65f9f69792ec;p=elisp%2Fgnus.git- Synch to No Gnus 200510310615. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 732f27b..0f193cd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-10-31 Katsumi Yamaoka + + * mm-util.el (mm-special-display-p): New function. + + * mml.el (mml-preview): Use it; doc fix. + 2005-10-29 Romain Francoise * message.el (message-fix-before-sending): Fix comment. diff --git a/lisp/mm-util.el b/lisp/mm-util.el index ff78b5c..da0d2a8 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -114,7 +114,22 @@ (make-directory file)) file))) (insert-byte . insert-char) - (multibyte-char-to-unibyte . identity)))) + (multibyte-char-to-unibyte . identity) + (special-display-p + . (lambda (buffer-name) + "Returns non-nil if a buffer named BUFFER-NAME gets a special frame." + (and special-display-function + (or (and (member buffer-name special-display-buffer-names) t) + (cdr (assoc buffer-name special-display-buffer-names)) + (catch 'return + (dolist (elem special-display-regexps) + (and (stringp elem) + (string-match elem buffer-name) + (throw 'return t)) + (and (consp elem) + (stringp (car elem)) + (string-match (car elem) buffer-name) + (throw 'return (cdr elem)))))))))))) (eval-and-compile (defalias 'mm-char-or-char-int-p diff --git a/lisp/mml.el b/lisp/mml.el index d4d4b69..93f5dfb 100644 --- a/lisp/mml.el +++ b/lisp/mml.el @@ -1213,7 +1213,12 @@ Should be adopted if code in `message-send-mail' is changed." (defun mml-preview (&optional raw) "Display current buffer with Gnus, in a new buffer. -If RAW, don't highlight the article." +If RAW, display a raw encoded MIME message. + +The window layout for the preview buffer is controled by the variables +`special-display-buffer-names', `special-display-regexps', or +`gnus-buffer-configuration' (the first match made will be used), +or the `pop-to-buffer' function." (interactive "P") (setq mml-preview-buffer (generate-new-buffer (concat (if raw "*Raw MIME preview of " @@ -1282,7 +1287,8 @@ If RAW, don't highlight the article." (interactive "@e") (widget-button-press (widget-event-point event) event))) (goto-char (point-min)))) - (if (and (boundp 'gnus-buffer-configuration) + (if (and (not (mm-special-display-p (buffer-name mml-preview-buffer))) + (boundp 'gnus-buffer-configuration) (assq 'mml-preview gnus-buffer-configuration)) (let ((gnus-message-buffer (current-buffer))) (gnus-configure-windows 'mml-preview))