Synch to No Gnus 200507220823.
authoryamaoka <yamaoka>
Fri, 22 Jul 2005 13:10:07 +0000 (13:10 +0000)
committeryamaoka <yamaoka>
Fri, 22 Jul 2005 13:10:07 +0000 (13:10 +0000)
lisp/ChangeLog
lisp/gnus-msg.el
lisp/mm-uu.el
lisp/mml.el

index a310785..fefbb50 100644 (file)
        string that is not RFC 2822 compliant (it lacks the zone).
        Update copyright notice.
 
+2005-07-21  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * mml.el (mml-minibuffer-read-disposition): Don't use inline by default
+       for text/rtf.  Display default in prompt.  Pass default for M-n.
+
+       * mm-uu.el (mm-uu-copy-to-buffer): Use with-current-buffer.
+
+2005-07-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-msg.el (gnus-button-mailto): Remove
+       save-selected-window-window hackery because it relies on
+       save-selected-window internals.
+
 2005-07-15  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-art.el (gnus-article-next-page): Use gnus-end-of-window.
index 390ad00..21541bf 100644 (file)
@@ -501,27 +501,19 @@ Gcc: header for archiving purposes."
   ;; COMPOSEFUNC should return t if succeed.  Undocumented ???
   t)
 
-(defvar save-selected-window-window)
-
 ;;;###autoload
 (defun gnus-button-mailto (address)
   "Mail to ADDRESS."
   (set-buffer (gnus-copy-article-buffer))
   (gnus-setup-message 'message
-    (message-reply address))
-  (and (boundp 'save-selected-window-window)
-       (not (window-live-p save-selected-window-window))
-       (setq save-selected-window-window (selected-window))))
+    (message-reply address)))
 
 ;;;###autoload
 (defun gnus-button-reply (&optional to-address wide)
   "Like `message-reply'."
   (interactive)
   (gnus-setup-message 'message
-    (message-reply to-address wide))
-  (and (boundp 'save-selected-window-window)
-       (not (window-live-p save-selected-window-window))
-       (setq save-selected-window-window (selected-window))))
+    (message-reply to-address wide)))
 
 ;;;###autoload
 (define-mail-user-agent 'gnus-user-agent
index 900689a..9f00f0c 100644 (file)
@@ -112,8 +112,8 @@ This can be either \"inline\" or \"attachment\".")
      "^exit 0$"
      mm-uu-shar-extract)
     (forward
-;;; Thanks to Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov> and
-;;; Peter von der Ah\'e <pahe@daimi.au.dk>
+     ;; Thanks to Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov> and
+     ;; Peter von der Ah\'e <pahe@daimi.au.dk>
      "^-+ \\(Start of \\)?Forwarded message"
      "^-+ End \\(of \\)?forwarded message"
      mm-uu-forward-extract
@@ -191,13 +191,12 @@ To disable dissecting shar codes, for instance, add
 (defun mm-uu-copy-to-buffer (&optional from to)
   "Copy the contents of the current buffer to a fresh buffer.
 Return that buffer."
-  (save-excursion
-    (let ((obuf (current-buffer))
-         (coding-system
-          ;; Might not exist in non-MULE XEmacs
-          (when (boundp 'buffer-file-coding-system)
-            buffer-file-coding-system)))
-      (set-buffer (generate-new-buffer " *mm-uu*"))
+  (let ((obuf (current-buffer))
+        (coding-system
+         ;; Might not exist in non-MULE XEmacs
+         (when (boundp 'buffer-file-coding-system)
+           buffer-file-coding-system)))
+    (with-current-buffer (generate-new-buffer " *mm-uu*")
       (setq buffer-file-coding-system coding-system)
       (insert-buffer-substring obuf from to)
       (current-buffer))))
index 38b35c4..044e4aa 100644 (file)
@@ -963,13 +963,15 @@ See Info node `(emacs-mime)Composing'.
     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)))