aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/image.el17
2 files changed, 9 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 747bbba97c4..a6c9482c5aa 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
12012-11-02 Glenn Morris <rgm@gnu.org> 12012-11-02 Glenn Morris <rgm@gnu.org>
2 2
3 * image.el (image-type-from-file-name): Trivial simplification.
4
3 * emacs-lisp/bytecomp.el (byte-compile-eval): 5 * emacs-lisp/bytecomp.el (byte-compile-eval):
4 Decouple "noruntime" and "cl-functions" warnings. 6 Decouple "noruntime" and "cl-functions" warnings.
5 7
diff --git a/lisp/image.el b/lisp/image.el
index aef44fc3701..bd2f5c3a3ca 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -309,16 +309,13 @@ be determined."
309Value is a symbol specifying the image type, or nil if type cannot 309Value is a symbol specifying the image type, or nil if type cannot
310be determined." 310be determined."
311 (let (type first) 311 (let (type first)
312 (or 312 (catch 'found
313 (catch 'found 313 (dolist (elem image-type-file-name-regexps first)
314 (dolist (elem image-type-file-name-regexps) 314 (when (string-match-p (car elem) file)
315 (when (string-match-p (car elem) file) 315 (if (image-type-available-p (setq type (cdr elem)))
316 (setq type (cdr elem)) 316 (throw 'found type)
317 (or first (setq first type)) 317 ;; If nothing seems to be supported, return first type that matched.
318 (if (image-type-available-p type) 318 (or first (setq first type))))))))
319 (throw 'found type)))))
320 ;; If nothing seems to be supported, return the first type that matched.
321 first)))
322 319
323;;;###autoload 320;;;###autoload
324(defun image-type (source &optional type data-p) 321(defun image-type (source &optional type data-p)