(featurep (if (eq type 'pbm) 'xbm type))))
(defun gnus-xmas-create-image (file &optional type data-p &rest props)
- (let ((type (if type
- (symbol-name type)
- (car (last (split-string file "[.]")))))
+ (let ((type (cond
+ (type
+ (symbol-name type))
+ ((and (not data-p)
+ (string-match "[.]" file))
+ (car (last (split-string file "[.]"))))))
(face (plist-get props :face))
glyph)
(when (equal type "pbm")
(insert-file-contents-literally file))
(make-glyph
(vector
- (or (intern type)
- (mm-image-type-from-buffer))
+ (if type
+ (intern type)
+ (mm-image-type-from-buffer))
:data (buffer-string))))))
(when face
(set-glyph-face glyph face))
(provide 'gnus-xmas)
-;;; arch-tag: 4e84de3f-ea0a-4ee3-bfeb-e03d46fcacef
;;; gnus-xmas.el ends here