From a328d85e9e14ae5b932e8a4e4e69f05de27f53d9 Mon Sep 17 00:00:00 2001 From: Tadashi MATSUO Date: Sat, 9 Jan 2010 00:16:36 +0900 Subject: [PATCH] 'twittering-image-type' can find image type without invoking 'file'. The function tries to find image type with 'image-type-from-data'. If the try fails, the function invokes 'file' as in the past. (twittering-image-type): Try to detect image type with `image-type-from-data' at first. --- ChangeLog | 5 +++++ twittering-mode.el | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2738db1a..0ccd2a87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -56,6 +56,11 @@ * twittering-mode.el (twittering-status-not-blank-p): bug fix: always return nil with strings with trailing newline. +2010-01-08 Tadashi MATSUO + + * twittering-mode.el (twittering-image-type): Try to detect image + type with `image-type-from-data' at first. + 2010-01-08 Yuto Hayamizu * twittering-mode.el (twittering-tmp-dir): delete diff --git a/twittering-mode.el b/twittering-mode.el index 4471b958..c03c2a55 100644 --- a/twittering-mode.el +++ b/twittering-mode.el @@ -323,6 +323,7 @@ and its contents(BUFFER)" (cdr type-cache) (let ((image-type (cond + ((image-type-from-data (buffer-string))) ((executable-find "file") (with-temp-buffer (let ((res-buf (current-buffer)))