diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/image.el | 25 |
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." | |||
| 690 | (cons images (+ (aref anim 1) (* (aref anim 2) 256)))))))) | 690 | (cons images (+ (aref anim 1) (* (aref anim 2) 256)))))))) |
| 691 | 691 | ||
| 692 | 692 | ||
| 693 | (defconst imagemagick-types-inhibit | ||
| 694 | '(C HTML HTM TXT) | ||
| 695 | "Types the imagemagic loader should not try to handle.") | ||
| 696 | |||
| 697 | ;;;###autoload | ||
| 698 | (defun imagemagic-register-types () | ||
| 699 | "Register file types that imagemagick is able to handle." | ||
| 700 | (let ((im-types (imagemagick-types)) | ||
| 701 | (im-inhibit imagemagick-types-inhibit)) | ||
| 702 | (while im-inhibit | ||
| 703 | (setq im-types (remove (car im-inhibit) im-types)) | ||
| 704 | (setq im-inhibit (cdr im-inhibit))) | ||
| 705 | (while im-types | ||
| 706 | (let | ||
| 707 | ((extension (downcase (symbol-name (car im-types))))) | ||
| 708 | (push | ||
| 709 | (cons (concat "\\." extension "\\'") 'image-mode) | ||
| 710 | auto-mode-alist) | ||
| 711 | (push | ||
| 712 | (cons (concat "\\." extension "\\'") 'imagemagick) | ||
| 713 | image-type-file-name-regexps) | ||
| 714 | (setq im-types (cdr im-types)))))) | ||
| 715 | |||
| 716 | |||
| 717 | |||
| 693 | (provide 'image) | 718 | (provide 'image) |
| 694 | 719 | ||
| 695 | ;; arch-tag: 8e76a07b-eb48-4f3e-a7a0-1a7ba9f096b3 | 720 | ;; arch-tag: 8e76a07b-eb48-4f3e-a7a0-1a7ba9f096b3 |