-(defun mm-get-image-emacs (handle)
- "Return an image instance based on HANDLE."
- (let ((type (mm-handle-media-subtype handle))
- spec)
- ;; Allow some common translations.
- (setq type
- (cond
- ((equal type "x-pixmap")
- "xpm")
- ((equal type "x-xbitmap")
- "xbm")
- (t type)))
- (or (mm-handle-cache handle)
- (mm-with-unibyte-buffer
- (mm-insert-part handle)
- (prog1
- (setq spec
- (ignore-errors
- (cond
- ((equal type "xbm")
- ;; xbm images require special handling, since
- ;; the only way to create glyphs from these
- ;; (without a ton of work) is to write them
- ;; out to a file, and then create a file
- ;; specifier.
- (error "Don't know what to do for XBMs right now."))
- (t
- (list 'image :type (intern type) :data (buffer-string))))))
- (mm-handle-set-cache handle spec))))))
-
-(defun mm-get-image-xemacs (handle)