emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp/gnus mml.el ChangeLog


From: Miles Bader
Subject: [Emacs-diffs] emacs/lisp/gnus mml.el ChangeLog
Date: Tue, 01 Sep 2009 07:59:52 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     09/09/01 07:59:51

Modified files:
        lisp/gnus      : mml.el ChangeLog 

Log message:
        Merge from gnus--devo--0
        
        Revision: address@hidden/emacs--devo--0--patch-1632

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/gnus/mml.el?cvsroot=emacs&r1=1.62&r2=1.63
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/gnus/ChangeLog?cvsroot=emacs&r1=1.821&r2=1.822

Patches:
Index: mml.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/mml.el,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -b -r1.62 -r1.63
--- mml.el      29 Aug 2009 00:27:13 -0000      1.62
+++ mml.el      1 Sep 2009 07:59:50 -0000       1.63
@@ -1292,14 +1292,24 @@
          (description (mml-minibuffer-read-description))
          (disposition (mml-minibuffer-read-disposition type nil file)))
      (list file type description disposition)))
-  (unless (message-in-body-p) (goto-char (point-max)))
+  ;; Don't move point if this command is invoked inside the message header.
+  (let ((head (unless (message-in-body-p)
+               (prog1
+                   (point)
+                 (goto-char (point-max))))))
   (mml-insert-empty-tag 'part
                        'type type
                        ;; icicles redefines read-file-name and returns a
                        ;; string w/ text properties :-/
                        'filename (mm-substring-no-properties file)
                        'disposition (or disposition "attachment")
-                       'description description))
+                         'description description)
+    (when head
+      (unless (prog1
+                 (pos-visible-in-window-p)
+               (goto-char head))
+       (message "The file \"%s\" has been attached at the end of the message"
+                (file-name-nondirectory file))))))
 
 (defun mml-dnd-attach-file (uri action)
   "Attach a drag and drop file.
@@ -1335,10 +1345,21 @@
          (description (mml-minibuffer-read-description))
          (disposition (mml-minibuffer-read-disposition type nil)))
      (list buffer type description disposition)))
-  (unless (message-in-body-p) (goto-char (point-max)))
+  ;; Don't move point if this command is invoked inside the message header.
+  (let ((head (unless (message-in-body-p)
+               (prog1
+                   (point)
+                 (goto-char (point-max))))))
   (mml-insert-empty-tag 'part 'type type 'buffer buffer
                        'disposition disposition
-                       'description description))
+                         'description description)
+    (when head
+      (unless (prog1
+                 (pos-visible-in-window-p)
+               (goto-char head))
+       (message
+        "The buffer \"%s\" has been attached at the end of the message"
+        buffer)))))
 
 (defun mml-attach-external (file &optional type description)
   "Attach an external file into the buffer.
@@ -1349,9 +1370,19 @@
          (type (mml-minibuffer-read-type file))
          (description (mml-minibuffer-read-description)))
      (list file type description)))
-  (unless (message-in-body-p) (goto-char (point-max)))
+  ;; Don't move point if this command is invoked inside the message header.
+  (let ((head (unless (message-in-body-p)
+               (prog1
+                   (point)
+                 (goto-char (point-max))))))
   (mml-insert-empty-tag 'external 'type type 'name file
-                       'disposition "attachment" 'description description))
+                         'disposition "attachment" 'description description)
+    (when head
+      (unless (prog1
+                 (pos-visible-in-window-p)
+               (goto-char head))
+       (message "The file \"%s\" has been attached at the end of the message"
+                (file-name-nondirectory file))))))
 
 (defun mml-insert-multipart (&optional type)
   (interactive (list (completing-read "Multipart type (default mixed): "

Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/ChangeLog,v
retrieving revision 1.821
retrieving revision 1.822
diff -u -b -r1.821 -r1.822
--- ChangeLog   1 Sep 2009 03:07:11 -0000       1.821
+++ ChangeLog   1 Sep 2009 07:59:51 -0000       1.822
@@ -3,6 +3,11 @@
        * gnus-salt.el (gnus-pick-mouse-pick-region): Use forward-line rather
        than goto-line.
 
+2009-08-31  Katsumi Yamaoka  <address@hidden>
+
+       * mml.el (mml-attach-file, mml-attach-buffer, mml-attach-external):
+       Don't move point if the command is invoked inside the message header.
+
 2009-08-29  Stefan Monnier  <address@hidden>
 
        * spam.el (spam-ifile-path, spam-bogofilter-path, spam-sa-learn-path)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]