summaryrefslogtreecommitdiff
path: root/lisp/image.el
diff options
context:
space:
mode:
authorJoakim Verona <joakim@verona.se>2010-04-02 23:09:13 +0200
committerJoakim Verona <joakim@verona.se>2010-04-02 23:09:13 +0200
commit3de25479216a2ecec509df8933047873d084f708 (patch)
tree55a93b61a20914cff6afe0c9f40d3bd0f8680ed7 /lisp/image.el
parent796bb9364a5244a089769f4c92daab1835b618c7 (diff)
downloademacs-3de25479216a2ecec509df8933047873d084f708.tar.gz
imagemagick patch5 + minor mods
Diffstat (limited to 'lisp/image.el')
-rw-r--r--lisp/image.el25
1 files changed, 25 insertions, 0 deletions
diff --git a/lisp/image.el b/lisp/image.el
index 67c1ad946b1..963093c6149 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -690,6 +690,31 @@ shall be displayed."
(cons images (+ (aref anim 1) (* (aref anim 2) 256))))))))
+(defconst imagemagick-types-inhibit
+ '(C HTML HTM TXT)
+ "Types the imagemagic loader should not try to handle.")
+
+;;;###autoload
+(defun imagemagic-register-types ()
+ "Register file types that imagemagick is able to handle."
+ (let ((im-types (imagemagick-types))
+ (im-inhibit imagemagick-types-inhibit))
+ (while im-inhibit
+ (setq im-types (remove (car im-inhibit) im-types))
+ (setq im-inhibit (cdr im-inhibit)))
+ (while im-types
+ (let
+ ((extension (downcase (symbol-name (car im-types)))))
+ (push
+ (cons (concat "\\." extension "\\'") 'image-mode)
+ auto-mode-alist)
+ (push
+ (cons (concat "\\." extension "\\'") 'imagemagick)
+ image-type-file-name-regexps)
+ (setq im-types (cdr im-types))))))
+
+
+
(provide 'image)
;; arch-tag: 8e76a07b-eb48-4f3e-a7a0-1a7ba9f096b3