aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2011-07-06 18:43:46 -0400
committerRichard M. Stallman2011-07-06 18:43:46 -0400
commit354cf0ba0b20108c9776be1d868458893bc2cd54 (patch)
tree2e51a199f4ab086515cf27d989a3273b8ef2c165
parenta821a23b32d376979c30396e62aece1994f0c460 (diff)
downloademacs-354cf0ba0b20108c9776be1d868458893bc2cd54.tar.gz
emacs-354cf0ba0b20108c9776be1d868458893bc2cd54.zip
Rmail mime: Use markers for positions in entities.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/mail/rmailmm.el23
2 files changed, 19 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 26e8bec7937..700a2b1f512 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12011-07-06 Richard Stallman <rms@gnu.org>
2
3 * mail/rmailmm.el (rmail-mime-process): Use markers for buf positions.
4 (rmail-mime-insert-bulk, rmail-mime-insert-text):
5 Treat markers like ints.
6 (rmail-mime-entity): Doc fix.
7
12011-07-06 Lars Magne Ingebrigtsen <larsi@gnus.org> 82011-07-06 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 9
3 * mail/smtpmail.el (smtpmail-default-smtp-server): Made into a 10 * mail/smtpmail.el (smtpmail-default-smtp-server): Made into a
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index 6f1bce03ee9..597068562b5 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -193,8 +193,8 @@ has these values:
193 raw: displayed by the raw MIME data (for the header and body only) 193 raw: displayed by the raw MIME data (for the header and body only)
194 194
195HEADER and BODY are vectors [BEG END DISPLAY-FLAG], where BEG and 195HEADER and BODY are vectors [BEG END DISPLAY-FLAG], where BEG and
196END specify the region of the header or body lines in RMAIL's 196END are markers that specify the region of the header or body lines
197data (mbox) buffer, and DISPLAY-FLAG non-nil means that the 197in RMAIL's data (mbox) buffer, and DISPLAY-FLAG non-nil means that the
198header or body is, by default, displayed by the decoded 198header or body is, by default, displayed by the decoded
199presentation form. 199presentation form.
200 200
@@ -547,7 +547,7 @@ HEADER is a header component of a MIME-entity object (see
547 (beg (point)) 547 (beg (point))
548 (segment (rmail-mime-entity-segment (point) entity))) 548 (segment (rmail-mime-entity-segment (point) entity)))
549 549
550 (or (integerp (aref body 0)) 550 (or (integerp (aref body 0)) (markerp (aref body 0))
551 (let ((data (buffer-string))) 551 (let ((data (buffer-string)))
552 (aset body 0 data) 552 (aset body 0 data)
553 (delete-region (point-min) (point-max)))) 553 (delete-region (point-min) (point-max))))
@@ -704,7 +704,7 @@ directly."
704 (segment (rmail-mime-entity-segment (point) entity)) 704 (segment (rmail-mime-entity-segment (point) entity))
705 beg data size) 705 beg data size)
706 706
707 (if (integerp (aref body 0)) 707 (if (or (integerp (aref body 0)) (markerp (aref body 0)))
708 (setq data entity 708 (setq data entity
709 size (car bulk-data)) 709 size (car bulk-data))
710 (if (stringp (aref body 0)) 710 (if (stringp (aref body 0))
@@ -1129,9 +1129,10 @@ modified."
1129 1129
1130 (if parse-tag 1130 (if parse-tag
1131 (let* ((is-inline (string= (car content-disposition) "inline")) 1131 (let* ((is-inline (string= (car content-disposition) "inline"))
1132 (header (vector (point-min) end nil)) 1132 (hdr-end (copy-marker end))
1133 (header (vector (point-min-marker) hdr-end nil))
1133 (tagline (vector parse-tag (cons nil nil) t)) 1134 (tagline (vector parse-tag (cons nil nil) t))
1134 (body (vector end (point-max) is-inline)) 1135 (body (vector hdr-end (point-max-marker) is-inline))
1135 (new (vector (aref header 2) (aref tagline 2) (aref body 2))) 1136 (new (vector (aref header 2) (aref tagline 2) (aref body 2)))
1136 children handler entity) 1137 children handler entity)
1137 (cond ((string-match "multipart/.*" (car content-type)) 1138 (cond ((string-match "multipart/.*" (car content-type))
@@ -1180,11 +1181,11 @@ modified."
1180 ;; Hide headers and handle the part. 1181 ;; Hide headers and handle the part.
1181 (put-text-property (point-min) (point-max) 'rmail-mime-entity 1182 (put-text-property (point-min) (point-max) 'rmail-mime-entity
1182 (rmail-mime-entity 1183 (rmail-mime-entity
1183 content-type content-disposition 1184 content-type content-disposition
1184 content-transfer-encoding 1185 content-transfer-encoding
1185 (vector (vector 'raw nil 'raw) (vector 'raw nil 'raw)) 1186 (vector (vector 'raw nil 'raw) (vector 'raw nil 'raw))
1186 (vector nil nil 'raw) (vector "" (cons nil nil) nil) 1187 (vector nil nil 'raw) (vector "" (cons nil nil) nil)
1187 (vector nil nil 'raw) nil nil)) 1188 (vector nil nil 'raw) nil nil))
1188 (save-restriction 1189 (save-restriction
1189 (cond ((string= (car content-type) "message/rfc822") 1190 (cond ((string= (car content-type) "message/rfc822")
1190 (narrow-to-region end (point-max))) 1191 (narrow-to-region end (point-max)))