Revision: miles@gnu.org--gnu-2005/gnus--devo--0--patch-160
authorMiles Bader <miles@gnu.org>
Fri, 22 Jul 2005 08:23:47 +0000 (08:23 +0000)
committerMiles Bader <miles@gnu.org>
Fri, 22 Jul 2005 08:23:47 +0000 (08:23 +0000)
Merge from gnus--rel--5.10

Patches applied:

 * emacs--cvs-trunk--0  (patch 487, 491)

   - Update from CVS

 * gnus--rel--5.10  (patch 93-94)

   - Update from CVS
   - Merge from emacs--cvs-trunk--0

2005-07-21  Stefan Monnier  <monnier@iro.umontreal.ca>

   * lisp/mml.el (mml-minibuffer-read-disposition): Don't use inline by default
   for text/rtf.  Display default in prompt.  Pass default for M-n.

   * lisp/mm-uu.el (mm-uu-copy-to-buffer): Use with-current-buffer.

2005-07-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>

   * lisp/gnus-msg.el (gnus-button-mailto): Remove
   save-selected-window-window hackery because it relies on
   save-selected-window internals.

lisp/ChangeLog
lisp/gnus-msg.el
lisp/mm-uu.el
lisp/mml.el

index 4765f3e..73a19b4 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 4d47fa8..5632ca4 100644 (file)
@@ -471,27 +471,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 e5580d3..f7d3a91 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))))
@@ -519,5 +518,5 @@ value of `mm-uu-text-plain-type'."
 
 (provide 'mm-uu)
 
-;;; arch-tag: 7db076bf-53db-4320-aa19-ca76a1d2ab2c
+;; arch-tag: 7db076bf-53db-4320-aa19-ca76a1d2ab2c
 ;;; mm-uu.el ends here
index 4e21e81..1b086a8 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)))