Mercurial > emacs
comparison lisp/gnus/mm-decode.el @ 68720:d9dde5b81e71
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 18-21)
- Update from CVS
- Merge from emacs--devo--0
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 08 Feb 2006 04:35:58 +0000 |
parents | dbc43cabc13b |
children | 808f636eb13e c5406394f567 |
comparison
equal
deleted
inserted
replaced
68719:2de3fcf69715 | 68720:d9dde5b81e71 |
---|---|
532 (mail-narrow-to-head) | 532 (mail-narrow-to-head) |
533 (when (or no-strict-mime | 533 (when (or no-strict-mime |
534 loose-mime | 534 loose-mime |
535 (mail-fetch-field "mime-version")) | 535 (mail-fetch-field "mime-version")) |
536 (setq ct (mail-fetch-field "content-type") | 536 (setq ct (mail-fetch-field "content-type") |
537 ctl (ignore-errors (mail-header-parse-content-type ct)) | 537 ctl (and ct (mail-header-parse-content-type ct)) |
538 cte (mail-fetch-field "content-transfer-encoding") | 538 cte (mail-fetch-field "content-transfer-encoding") |
539 cd (mail-fetch-field "content-disposition") | 539 cd (mail-fetch-field "content-disposition") |
540 description (mail-fetch-field "content-description") | 540 description (mail-fetch-field "content-description") |
541 id (mail-fetch-field "content-id")) | 541 id (mail-fetch-field "content-id")) |
542 (unless from | 542 (unless from |
543 (setq from (mail-fetch-field "from"))) | 543 (setq from (mail-fetch-field "from"))) |
544 ;; FIXME: In some circumstances, this code is running within | 544 ;; FIXME: In some circumstances, this code is running within |
545 ;; an unibyte macro. mail-extract-address-components | 545 ;; an unibyte macro. mail-extract-address-components |
546 ;; creates unibyte buffers. This `if', though not a perfect | 546 ;; creates unibyte buffers. This `if', though not a perfect |
547 ;; solution, avoids most of them. | 547 ;; solution, avoids most of them. |
548 (if from | 548 (if from |
555 (list mm-dissect-default-type) | 555 (list mm-dissect-default-type) |
556 (and cte (intern (downcase (mail-header-remove-whitespace | 556 (and cte (intern (downcase (mail-header-remove-whitespace |
557 (mail-header-remove-comments | 557 (mail-header-remove-comments |
558 cte))))) | 558 cte))))) |
559 no-strict-mime | 559 no-strict-mime |
560 (and cd (ignore-errors (mail-header-parse-content-disposition cd))) | 560 (and cd (mail-header-parse-content-disposition cd)) |
561 description) | 561 description) |
562 (setq type (split-string (car ctl) "/")) | 562 (setq type (split-string (car ctl) "/")) |
563 (setq subtype (cadr type) | 563 (setq subtype (cadr type) |
564 type (pop type)) | 564 type (pop type)) |
565 (setq | 565 (setq |
590 ctl | 590 ctl |
591 (and cte (intern (downcase (mail-header-remove-whitespace | 591 (and cte (intern (downcase (mail-header-remove-whitespace |
592 (mail-header-remove-comments | 592 (mail-header-remove-comments |
593 cte))))) | 593 cte))))) |
594 no-strict-mime | 594 no-strict-mime |
595 (and cd (ignore-errors | 595 (and cd (mail-header-parse-content-disposition cd)) |
596 (mail-header-parse-content-disposition cd))) | |
597 description id) | 596 description id) |
598 ctl)))) | 597 ctl)))) |
599 (when id | 598 (when id |
600 (when (string-match " *<\\(.*\\)> *" id) | 599 (when (string-match " *<\\(.*\\)> *" id) |
601 (setq id (match-string 1 id))) | 600 (setq id (match-string 1 id))) |
1399 (goto-char (match-beginning 0)) | 1398 (goto-char (match-beginning 0)) |
1400 (when start | 1399 (when start |
1401 (save-excursion | 1400 (save-excursion |
1402 (save-restriction | 1401 (save-restriction |
1403 (narrow-to-region start (1- (point))) | 1402 (narrow-to-region start (1- (point))) |
1404 (when (let ((ctl (ignore-errors | 1403 (when (let* ((ct (mail-fetch-field "content-type")) |
1405 (mail-header-parse-content-type | 1404 (ctl (and ct (mail-header-parse-content-type ct)))) |
1406 (mail-fetch-field "content-type"))))) | |
1407 (if notp | 1405 (if notp |
1408 (not (equal (car ctl) type)) | 1406 (not (equal (car ctl) type)) |
1409 (equal (car ctl) type))) | 1407 (equal (car ctl) type))) |
1410 (setq result (buffer-string)))))) | 1408 (setq result (buffer-string)))))) |
1411 (forward-line 1) | 1409 (forward-line 1) |
1412 (setq start (point))) | 1410 (setq start (point))) |
1413 (when (and (not result) start) | 1411 (when (and (not result) start) |
1414 (save-excursion | 1412 (save-excursion |
1415 (save-restriction | 1413 (save-restriction |
1416 (narrow-to-region start end) | 1414 (narrow-to-region start end) |
1417 (when (let ((ctl (ignore-errors | 1415 (when (let* ((ct (mail-fetch-field "content-type")) |
1418 (mail-header-parse-content-type | 1416 (ctl (and ct (mail-header-parse-content-type ct)))) |
1419 (mail-fetch-field "content-type"))))) | |
1420 (if notp | 1417 (if notp |
1421 (not (equal (car ctl) type)) | 1418 (not (equal (car ctl) type)) |
1422 (equal (car ctl) type))) | 1419 (equal (car ctl) type))) |
1423 (setq result (buffer-string)))))) | 1420 (setq result (buffer-string)))))) |
1424 result)) | 1421 result)) |