2010-08-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * gnus-xmas.el (gnus-xmas-create-image): Make this work on files that
+ don't have dots in their names.
+
* gnus-art.el (gnus-article-view-part): Doc fix.
* gnus-html.el (gnus-html-put-image): Use gnus-create-image to be
(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))
+ ((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))