aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2009-09-01 07:59:50 +0000
committerMiles Bader2009-09-01 07:59:50 +0000
commit29b647c561df4ad2c83287f75acfd601e6c01085 (patch)
treeac08b02238034cbe42300c0bbd409ba2880db2f0
parent49c539a128756bba53430ca5f6254583d70aacf5 (diff)
downloademacs-29b647c561df4ad2c83287f75acfd601e6c01085.tar.gz
emacs-29b647c561df4ad2c83287f75acfd601e6c01085.zip
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1632
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/mml.el61
2 files changed, 51 insertions, 15 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 9f0cc223cfd..3548afa1584 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -3,6 +3,11 @@
3 * gnus-salt.el (gnus-pick-mouse-pick-region): Use forward-line rather 3 * gnus-salt.el (gnus-pick-mouse-pick-region): Use forward-line rather
4 than goto-line. 4 than goto-line.
5 5
62009-08-31 Katsumi Yamaoka <yamaoka@jpl.org>
7
8 * mml.el (mml-attach-file, mml-attach-buffer, mml-attach-external):
9 Don't move point if the command is invoked inside the message header.
10
62009-08-29 Stefan Monnier <monnier@iro.umontreal.ca> 112009-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
7 12
8 * spam.el (spam-ifile-path, spam-bogofilter-path, spam-sa-learn-path) 13 * spam.el (spam-ifile-path, spam-bogofilter-path, spam-sa-learn-path)
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 796470bd17f..bac8a5aaaf0 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -1292,14 +1292,24 @@ body) or \"attachment\" (separate from the body)."
1292 (description (mml-minibuffer-read-description)) 1292 (description (mml-minibuffer-read-description))
1293 (disposition (mml-minibuffer-read-disposition type nil file))) 1293 (disposition (mml-minibuffer-read-disposition type nil file)))
1294 (list file type description disposition))) 1294 (list file type description disposition)))
1295 (unless (message-in-body-p) (goto-char (point-max))) 1295 ;; Don't move point if this command is invoked inside the message header.
1296 (mml-insert-empty-tag 'part 1296 (let ((head (unless (message-in-body-p)
1297 'type type 1297 (prog1
1298 ;; icicles redefines read-file-name and returns a 1298 (point)
1299 ;; string w/ text properties :-/ 1299 (goto-char (point-max))))))
1300 'filename (mm-substring-no-properties file) 1300 (mml-insert-empty-tag 'part
1301 'disposition (or disposition "attachment") 1301 'type type
1302 'description description)) 1302 ;; icicles redefines read-file-name and returns a
1303 ;; string w/ text properties :-/
1304 'filename (mm-substring-no-properties file)
1305 'disposition (or disposition "attachment")
1306 'description description)
1307 (when head
1308 (unless (prog1
1309 (pos-visible-in-window-p)
1310 (goto-char head))
1311 (message "The file \"%s\" has been attached at the end of the message"
1312 (file-name-nondirectory file))))))
1303 1313
1304(defun mml-dnd-attach-file (uri action) 1314(defun mml-dnd-attach-file (uri action)
1305 "Attach a drag and drop file. 1315 "Attach a drag and drop file.
@@ -1335,10 +1345,21 @@ BUFFER is the name of the buffer to attach. See
1335 (description (mml-minibuffer-read-description)) 1345 (description (mml-minibuffer-read-description))
1336 (disposition (mml-minibuffer-read-disposition type nil))) 1346 (disposition (mml-minibuffer-read-disposition type nil)))
1337 (list buffer type description disposition))) 1347 (list buffer type description disposition)))
1338 (unless (message-in-body-p) (goto-char (point-max))) 1348 ;; Don't move point if this command is invoked inside the message header.
1339 (mml-insert-empty-tag 'part 'type type 'buffer buffer 1349 (let ((head (unless (message-in-body-p)
1340 'disposition disposition 1350 (prog1
1341 'description description)) 1351 (point)
1352 (goto-char (point-max))))))
1353 (mml-insert-empty-tag 'part 'type type 'buffer buffer
1354 'disposition disposition
1355 'description description)
1356 (when head
1357 (unless (prog1
1358 (pos-visible-in-window-p)
1359 (goto-char head))
1360 (message
1361 "The buffer \"%s\" has been attached at the end of the message"
1362 buffer)))))
1342 1363
1343(defun mml-attach-external (file &optional type description) 1364(defun mml-attach-external (file &optional type description)
1344 "Attach an external file into the buffer. 1365 "Attach an external file into the buffer.
@@ -1349,9 +1370,19 @@ TYPE is the MIME type to use."
1349 (type (mml-minibuffer-read-type file)) 1370 (type (mml-minibuffer-read-type file))
1350 (description (mml-minibuffer-read-description))) 1371 (description (mml-minibuffer-read-description)))
1351 (list file type description))) 1372 (list file type description)))
1352 (unless (message-in-body-p) (goto-char (point-max))) 1373 ;; Don't move point if this command is invoked inside the message header.
1353 (mml-insert-empty-tag 'external 'type type 'name file 1374 (let ((head (unless (message-in-body-p)
1354 'disposition "attachment" 'description description)) 1375 (prog1
1376 (point)
1377 (goto-char (point-max))))))
1378 (mml-insert-empty-tag 'external 'type type 'name file
1379 'disposition "attachment" 'description description)
1380 (when head
1381 (unless (prog1
1382 (pos-visible-in-window-p)
1383 (goto-char head))
1384 (message "The file \"%s\" has been attached at the end of the message"
1385 (file-name-nondirectory file))))))
1355 1386
1356(defun mml-insert-multipart (&optional type) 1387(defun mml-insert-multipart (&optional type)
1357 (interactive (list (completing-read "Multipart type (default mixed): " 1388 (interactive (list (completing-read "Multipart type (default mixed): "