Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
11fef14a
Commit
11fef14a
authored
Nov 02, 2012
by
Glenn Morris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* lisp/image.el (image-type-from-file-name): Trivial simplification.
parent
3a6851d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
lisp/ChangeLog
lisp/ChangeLog
+2
-0
lisp/image.el
lisp/image.el
+7
-10
No files found.
lisp/ChangeLog
View file @
11fef14a
2012-11-02 Glenn Morris <rgm@gnu.org>
* image.el (image-type-from-file-name): Trivial simplification.
* emacs-lisp/bytecomp.el (byte-compile-eval):
Decouple "noruntime" and "cl-functions" warnings.
...
...
lisp/image.el
View file @
11fef14a
...
...
@@ -309,16 +309,13 @@ be determined."
Value
is
a
symbol
specifying
the
image
type,
or
nil
if
type
cannot
be
determined.
"
(let (type first)
(or
(catch 'found
(dolist (elem image-type-file-name-regexps)
(when (string-match-p (car elem) file)
(setq type (cdr elem))
(or first (setq first type))
(if (image-type-available-p type)
(throw 'found type)))))
;; If nothing seems to be supported, return the first type that matched.
first)))
(catch 'found
(dolist (elem image-type-file-name-regexps first)
(when (string-match-p (car elem) file)
(if (image-type-available-p (setq type (cdr elem)))
(throw 'found type)
;; If nothing seems to be supported, return first type that matched.
(or first (setq first type))))))))
;;;###autoload
(defun image-type (source &optional type data-p)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment