Navigation Menu

Skip to content

Commit

Permalink
'twittering-image-type' can find image type without invoking 'file'.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cvmat authored and hayamiz committed Jan 10, 2010
1 parent 72d6d83 commit a328d85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Expand Up @@ -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 <tad@mymail.twin.jp>

* twittering-mode.el (twittering-image-type): Try to detect image
type with `image-type-from-data' at first.

2010-01-08 Yuto Hayamizu <y.hayamizu@gmail.com>

* twittering-mode.el (twittering-tmp-dir): delete
Expand Down
1 change: 1 addition & 0 deletions twittering-mode.el
Expand Up @@ -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)))
Expand Down

0 comments on commit a328d85

Please sign in to comment.