• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/gnus/

Lines Matching refs:handle

63 (defmacro mm-handle-buffer (handle)
64 `(nth 0 ,handle))
65 (defmacro mm-handle-type (handle)
66 `(nth 1 ,handle))
67 (defsubst mm-handle-media-type (handle)
68 (if (stringp (car handle))
69 (car handle)
70 (car (mm-handle-type handle))))
71 (defsubst mm-handle-media-supertype (handle)
72 (car (split-string (mm-handle-media-type handle) "/")))
73 (defsubst mm-handle-media-subtype (handle)
74 (cadr (split-string (mm-handle-media-type handle) "/")))
75 (defmacro mm-handle-encoding (handle)
76 `(nth 2 ,handle))
77 (defmacro mm-handle-undisplayer (handle)
78 `(nth 3 ,handle))
79 (defmacro mm-handle-set-undisplayer (handle function)
80 `(setcar (nthcdr 3 ,handle) ,function))
81 (defmacro mm-handle-disposition (handle)
82 `(nth 4 ,handle))
83 (defmacro mm-handle-description (handle)
84 `(nth 5 ,handle))
85 (defmacro mm-handle-cache (handle)
86 `(nth 6 ,handle))
87 (defmacro mm-handle-set-cache (handle contents)
88 `(setcar (nthcdr 6 ,handle) ,contents))
89 (defmacro mm-handle-id (handle)
90 `(nth 7 ,handle))
91 (defmacro mm-handle-multipart-original-buffer (handle)
92 `(get-text-property 0 'buffer (car ,handle)))
93 (defmacro mm-handle-multipart-from (handle)
94 `(get-text-property 0 'from (car ,handle)))
95 (defmacro mm-handle-multipart-ctl-parameter (handle parameter)
96 `(get-text-property 0 ,parameter (car ,handle)))
98 (defmacro mm-make-handle (&optional buffer type encoding undisplayer
183 (lambda (handle)
184 (mm-valid-and-fit-image-p 'jpeg handle)))
187 (lambda (handle)
188 (mm-valid-and-fit-image-p 'png handle)))
191 (lambda (handle)
192 (mm-valid-and-fit-image-p 'gif handle)))
195 (lambda (handle)
196 (mm-valid-and-fit-image-p 'tiff handle)) )
199 (lambda (handle)
200 (mm-valid-and-fit-image-p 'xbm handle)))
203 (lambda (handle)
204 (mm-valid-and-fit-image-p 'xbm handle)))
207 (lambda (handle)
208 (mm-valid-and-fit-image-p 'xpm handle)))
211 (lambda (handle)
212 (mm-valid-and-fit-image-p 'xpm handle)))
215 (lambda (handle)
216 (mm-valid-and-fit-image-p 'bmp handle)))
219 (lambda (handle)
220 (mm-valid-and-fit-image-p 'pbm handle)))
225 (lambda (handle)
236 (lambda (handle)
241 (lambda (handle)
250 (lambda (handle)
255 (lambda (handle)
502 (defun mm-keep-viewer-alive-p (handle)
505 (type (mm-handle-media-type handle))
512 (defun mm-handle-set-external-undisplayer (handle function)
516 (if (mm-keep-viewer-alive-p handle)
517 (let ((new-handle (copy-sequence handle)))
518 (mm-handle-set-undisplayer new-handle function)
519 (mm-handle-set-undisplayer handle nil)
520 (push new-handle mm-postponed-undisplay-list))
521 (mm-handle-set-undisplayer handle function)))
578 ;; MIME handle back to it's parent MIME handle (in a multilevel
580 ;; the mm-handle API so we simply store the multipart buffer
610 (mm-make-handle
656 (defun mm-display-parts (handle &optional no-default)
657 (if (stringp (car handle))
658 (mapcar 'mm-display-parts (cdr handle))
659 (if (bufferp (car handle))
662 (mm-display-part handle)
664 (mapcar 'mm-display-parts handle))))
666 (defun mm-display-part (handle &optional no-default)
672 (if (mm-handle-displayed-p handle)
673 (mm-remove-part handle)
674 (let* ((ehandle (if (equal (mm-handle-media-type handle)
677 (unless (mm-handle-cache handle)
678 (mm-extern-cache-contents handle))
679 (mm-handle-cache handle))
680 handle))
681 (type (mm-handle-media-type ehandle))
684 (mm-handle-disposition handle) 'filename)
686 (mm-handle-type handle) 'name)
693 (mm-display-inline handle)
701 (mm-insert-inline handle (mm-get-part handle))
720 handle (or method 'mailcap-save-binary-file))
722 handle 'mailcap-save-binary-file)))))))))
724 (defun mm-display-external (handle method)
734 (mm-insert-part handle)
748 (mm-handle-media-type handle) t))))
752 (mm-save-part handle))
755 (mm-handle-set-undisplayer handle mm)))))
757 (mm-insert-part handle)
762 (mm-handle-disposition handle) 'filename)
764 (mm-handle-type handle) 'name)))
766 (mm-handle-media-type handle) t))
786 (setq suffix (car (rassoc (mm-handle-media-type handle)
796 method file (mm-handle-type handle))))
820 (mm-handle-set-external-undisplayer handle (cons file buffer)))
827 handle
836 method file (mm-handle-type handle)))
851 method file (mm-handle-type handle))))
877 (list 'mm-handle-set-undisplayer
878 (list 'quote handle)
901 (mm-handle-set-external-undisplayer
902 handle (cons file buffer)))
944 (let (handle)
945 (while (setq handle (pop handles))
947 ((stringp handle)
948 (when (buffer-live-p (get-text-property 0 'buffer handle))
949 (kill-buffer (get-text-property 0 'buffer handle))))
950 ((and (listp handle)
951 (stringp (car handle)))
952 (mm-remove-parts (cdr handle)))
954 (mm-remove-part handle)))))))
961 (let (handle)
962 (while (setq handle (pop handles))
964 ((stringp handle)
965 (when (buffer-live-p (get-text-property 0 'buffer handle))
966 (kill-buffer (get-text-property 0 'buffer handle))))
967 ((and (listp handle)
968 (stringp (car handle)))
969 (mm-destroy-parts handle))
971 (mm-destroy-part handle)))))))
973 (defun mm-remove-part (handle)
975 (when (listp handle)
976 (let ((object (mm-handle-undisplayer handle)))
1003 (mm-handle-set-undisplayer handle nil))))
1005 (defun mm-display-inline (handle)
1006 (let* ((type (mm-handle-media-type handle))
1008 (funcall function handle)
1016 (defun mm-automatic-display-p (handle)
1019 (type (mm-handle-media-type handle))
1022 (when (and (not (mm-inline-override-p handle))
1028 (defun mm-inlinable-p (handle &optional type)
1032 (unless type (setq type (mm-handle-media-type handle)))
1039 (setq test (funcall test handle)))
1043 (defun mm-inlined-p (handle)
1046 (type (mm-handle-media-type handle))
1049 (when (and (not (mm-inline-override-p handle))
1055 (defun mm-attachment-override-p (handle)
1058 (type (mm-handle-media-type handle))
1063 (mm-inlinable-p handle))
1066 (defun mm-inline-override-p (handle)
1069 (type (mm-handle-media-type handle))
1086 (defun mm-destroy-part (handle)
1088 (when (listp handle)
1089 (mm-remove-part handle)
1090 (when (buffer-live-p (mm-handle-buffer handle))
1091 (kill-buffer (mm-handle-buffer handle)))))
1093 (defun mm-handle-displayed-p (handle)
1095 (mm-handle-undisplayer handle))
1101 (defmacro mm-with-part (handle &rest forms)
1103 `(let* ((handle ,handle)
1109 (with-current-buffer (mm-handle-buffer handle)
1112 (insert-buffer-substring (mm-handle-buffer handle))
1115 (mm-handle-encoding handle)
1116 (mm-handle-media-type handle))
1121 (defun mm-get-part (handle &optional no-cache)
1126 (equal (mm-handle-media-type handle) "message/external-body"))
1128 (unless (mm-handle-cache handle)
1129 (mm-extern-cache-contents handle))
1130 (with-current-buffer (mm-handle-buffer (mm-handle-cache handle))
1132 (mm-with-part handle
1135 (defun mm-insert-part (handle &optional no-cache)
1141 (cond ((eq (mail-content-type-get (mm-handle-type handle) 'charset)
1143 (with-current-buffer (mm-handle-buffer handle)
1146 (mm-string-to-multibyte (mm-get-part handle no-cache)))
1148 (mm-get-part handle no-cache))))))
1188 (defun mm-save-part (handle)
1191 (mm-handle-disposition handle) 'filename)
1193 (mm-handle-type handle) 'name)))
1208 (mm-save-part-to-file handle file)
1211 (defun mm-save-part-to-file (handle file)
1213 (mm-insert-part handle)
1227 (defun mm-pipe-part (handle)
1229 (let* ((name (mail-content-type-get (mm-handle-type handle) 'name))
1233 (mm-insert-part handle)
1237 (defun mm-interactively-view-part (handle)
1239 (let* ((type (mm-handle-media-type handle))
1250 (mm-display-external handle method)))
1256 p h result type handle)
1260 (setq handle (car h))
1261 (setq type (mm-handle-media-type handle))
1263 (mm-automatic-display-p handle)
1264 (or (stringp (car handle))
1265 (not (mm-handle-disposition handle))
1266 (equal (car (mm-handle-disposition handle))
1268 (setq result handle
1276 (let ((seq (nreverse (mapcar #'mm-handle-media-type
1285 "Return the handle(s) referred to by ID."
1317 (defun mm-get-image (handle)
1319 (let ((type (mm-handle-media-subtype handle))
1331 (or (mm-handle-cache handle)
1333 (mm-insert-part handle)
1345 (mm-handle-set-cache handle spec))))))
1371 (defun mm-image-fit-p (handle)
1373 (let ((image (mm-get-image handle)))
1401 (defun mm-valid-and-fit-image-p (format handle)
1404 (mm-image-fit-p handle)))
1410 (let (handle)
1413 (if (setq handle (mm-find-part-by-type (cdar handles) type
1417 (not (equal (mm-handle-media-type (car handles)) type))
1418 (equal (mm-handle-media-type (car handles)) type))
1419 (setq handle (car handles)
1422 handle))
1426 (let* ((boundary (concat "--" (mm-handle-multipart-ctl-parameter ctl
1464 (defvar mm-security-handle nil)
1466 (defsubst mm-set-handle-multipart-parameter (handle parameter value)
1468 (when handle
1469 (put-text-property 0 (length (car handle)) parameter value
1470 (car handle))))
1475 (mm-security-handle ctl) ;; (car CTL) is the type.
1491 (mm-handle-multipart-ctl-parameter ctl 'protocol))
1520 (mm-set-handle-multipart-parameter
1521 mm-security-handle 'gnus-details
1525 (mm-handle-multipart-ctl-parameter ctl 'protocol))
1529 (if (assoc (mm-handle-media-type (car parts))
1531 (setq protocol (mm-handle-media-type (car parts))
1552 (mm-set-handle-multipart-parameter
1553 mm-security-handle 'gnus-details
1577 (defun mm-readable-p (handle)
1579 (and (< (with-current-buffer (mm-handle-buffer handle)
1582 (mm-insert-part handle)