Mercurial > emacs
comparison lisp/gnus/mml.el @ 104692:b99b3dda298b
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1629
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sat, 29 Aug 2009 00:27:12 +0000 |
parents | 93b10d2621d3 |
children | d44c1d7690e7 |
comparison
equal
deleted
inserted
replaced
104691:669c6df8c8b9 | 104692:b99b3dda298b |
---|---|
1290 (let* ((file (mml-minibuffer-read-file "Attach file: ")) | 1290 (let* ((file (mml-minibuffer-read-file "Attach file: ")) |
1291 (type (mml-minibuffer-read-type file)) | 1291 (type (mml-minibuffer-read-type file)) |
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 (save-excursion | 1295 (unless (message-in-body-p) (goto-char (point-max))) |
1296 (unless (message-in-body-p) (goto-char (point-max))) | 1296 (mml-insert-empty-tag 'part |
1297 (mml-insert-empty-tag 'part | 1297 'type type |
1298 'type type | 1298 ;; icicles redefines read-file-name and returns a |
1299 ;; icicles redefines read-file-name and returns a | 1299 ;; string w/ text properties :-/ |
1300 ;; string w/ text properties :-/ | 1300 'filename (mm-substring-no-properties file) |
1301 'filename (mm-substring-no-properties file) | 1301 'disposition (or disposition "attachment") |
1302 'disposition (or disposition "attachment") | 1302 'description description)) |
1303 'description description))) | |
1304 | 1303 |
1305 (defun mml-dnd-attach-file (uri action) | 1304 (defun mml-dnd-attach-file (uri action) |
1306 "Attach a drag and drop file. | 1305 "Attach a drag and drop file. |
1307 | 1306 |
1308 Ask for type, description or disposition according to | 1307 Ask for type, description or disposition according to |
1334 (let* ((buffer (read-buffer "Attach buffer: ")) | 1333 (let* ((buffer (read-buffer "Attach buffer: ")) |
1335 (type (mml-minibuffer-read-type buffer "text/plain")) | 1334 (type (mml-minibuffer-read-type buffer "text/plain")) |
1336 (description (mml-minibuffer-read-description)) | 1335 (description (mml-minibuffer-read-description)) |
1337 (disposition (mml-minibuffer-read-disposition type nil))) | 1336 (disposition (mml-minibuffer-read-disposition type nil))) |
1338 (list buffer type description disposition))) | 1337 (list buffer type description disposition))) |
1339 (save-excursion | 1338 (unless (message-in-body-p) (goto-char (point-max))) |
1340 (unless (message-in-body-p) (goto-char (point-max))) | 1339 (mml-insert-empty-tag 'part 'type type 'buffer buffer |
1341 (mml-insert-empty-tag 'part 'type type 'buffer buffer | 1340 'disposition disposition |
1342 'disposition disposition | 1341 'description description)) |
1343 'description description))) | |
1344 | 1342 |
1345 (defun mml-attach-external (file &optional type description) | 1343 (defun mml-attach-external (file &optional type description) |
1346 "Attach an external file into the buffer. | 1344 "Attach an external file into the buffer. |
1347 FILE is an ange-ftp/efs specification of the part location. | 1345 FILE is an ange-ftp/efs specification of the part location. |
1348 TYPE is the MIME type to use." | 1346 TYPE is the MIME type to use." |
1349 (interactive | 1347 (interactive |
1350 (let* ((file (mml-minibuffer-read-file "Attach external file: ")) | 1348 (let* ((file (mml-minibuffer-read-file "Attach external file: ")) |
1351 (type (mml-minibuffer-read-type file)) | 1349 (type (mml-minibuffer-read-type file)) |
1352 (description (mml-minibuffer-read-description))) | 1350 (description (mml-minibuffer-read-description))) |
1353 (list file type description))) | 1351 (list file type description))) |
1354 (save-excursion | 1352 (unless (message-in-body-p) (goto-char (point-max))) |
1355 (unless (message-in-body-p) (goto-char (point-max))) | 1353 (mml-insert-empty-tag 'external 'type type 'name file |
1356 (mml-insert-empty-tag 'external 'type type 'name file | 1354 'disposition "attachment" 'description description)) |
1357 'disposition "attachment" 'description description))) | |
1358 | 1355 |
1359 (defun mml-insert-multipart (&optional type) | 1356 (defun mml-insert-multipart (&optional type) |
1360 (interactive (list (completing-read "Multipart type (default mixed): " | 1357 (interactive (list (completing-read "Multipart type (default mixed): " |
1361 '(("mixed") ("alternative") ("digest") ("parallel") | 1358 '(("mixed") ("alternative") ("digest") ("parallel") |
1362 ("signed") ("encrypted")) | 1359 ("signed") ("encrypted")) |