changeset 64582:3196fbe99547

(mml-minibuffer-read-disposition): Don't use inline by default for text/rtf. Display default in prompt. Pass default for M-n.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 21 Jul 2005 19:08:30 +0000
parents 87f087128cf2
children e254b23f6e7b
files lisp/gnus/mml.el
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/mml.el	Thu Jul 21 19:03:30 2005 +0000
+++ b/lisp/gnus/mml.el	Thu Jul 21 19:08:30 2005 +0000
@@ -943,13 +943,15 @@
     description))
 
 (defun mml-minibuffer-read-disposition (type &optional default)
-  (let* ((default (or default
-		      (if (string-match "^text/.*" type)
-			  "inline"
-			"attachment")))
-	 (disposition (completing-read "Disposition: "
-				       '(("attachment") ("inline") (""))
-				       nil t)))
+  (unless default (setq default
+                        (if (and (string-match "\\`text/" type)
+                                 (not (string-match "\\`text/rtf\\'" type)))
+                            "inline"
+                          "attachment")))
+  (let ((disposition (completing-read
+                      (format "Disposition (default %s): " default)
+                      '(("attachment") ("inline") (""))
+                      nil t nil nil default)))
     (if (not (equal disposition ""))
 	disposition
       default)))