diff options
| author | Glenn Morris | 2010-09-08 19:25:12 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-09-08 19:25:12 -0700 |
| commit | 399653d69713b1eb4b1c6cd38b7d3a99270387dc (patch) | |
| tree | 5bd88dc530fa58579e962631662ca831fc29fa0e | |
| parent | 8740c12d6914104519d75307f28d9517628cc9b4 (diff) | |
| download | emacs-399653d69713b1eb4b1c6cd38b7d3a99270387dc.tar.gz emacs-399653d69713b1eb4b1c6cd38b7d3a99270387dc.zip | |
Tiny image.el fixes.
* lisp/image.el (imagemagick-types-inhibit): Add :type, :version, :group.
(imagemagick-register-types): Doc fix.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/image.el | 15 |
2 files changed, 16 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4cfab866c82..5608a04d4c8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-09-09 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * image.el (imagemagick-types-inhibit): Add :type, :version, :group. | ||
| 4 | (imagemagick-register-types): Doc fix. | ||
| 5 | |||
| 1 | 2010-09-08 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2010-09-08 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * progmodes/octave-mod.el (electric-indent-chars): Silence bytecomp. | 8 | * progmodes/octave-mod.el (electric-indent-chars): Silence bytecomp. |
diff --git a/lisp/image.el b/lisp/image.el index 20e3d5f85aa..2ca2971b4aa 100644 --- a/lisp/image.el +++ b/lisp/image.el | |||
| @@ -697,21 +697,28 @@ shall be displayed." | |||
| 697 | 697 | ||
| 698 | (defcustom imagemagick-types-inhibit | 698 | (defcustom imagemagick-types-inhibit |
| 699 | '(C HTML HTM TXT PDF) | 699 | '(C HTML HTM TXT PDF) |
| 700 | "Types the imagemagick loader should not try to handle.") | 700 | ;; FIXME what are the possible options? |
| 701 | ;; Are these actually file-name extensions? | ||
| 702 | ;; Why are these upper-case when eg image-types is lower-case? | ||
| 703 | "Types the ImageMagick loader should not try to handle." | ||
| 704 | :type '(choice (const :tag "Let ImageMagick handle all the types it can" nil) | ||
| 705 | (repeat symbol)) | ||
| 706 | :version "24.1" | ||
| 707 | :group 'image) | ||
| 701 | 708 | ||
| 702 | ;;;###autoload | 709 | ;;;###autoload |
| 703 | (defun imagemagick-register-types () | 710 | (defun imagemagick-register-types () |
| 704 | "Register file types that imagemagick is able to handle." | 711 | "Register the file types that ImageMagick is able to handle." |
| 705 | (let ((im-types (imagemagick-types))) | 712 | (let ((im-types (imagemagick-types))) |
| 706 | (dolist (im-inhibit imagemagick-types-inhibit) | 713 | (dolist (im-inhibit imagemagick-types-inhibit) |
| 707 | (setq im-types (remove im-inhibit im-types))) | 714 | (setq im-types (remove im-inhibit im-types))) |
| 708 | (dolist (im-type im-types) | 715 | (dolist (im-type im-types) |
| 709 | (let ((extension (downcase (symbol-name im-type)))) | 716 | (let ((extension (downcase (symbol-name im-type)))) |
| 710 | (push | 717 | (push |
| 711 | (cons (concat "\\." extension "\\'") 'image-mode) | 718 | (cons (concat "\\." extension "\\'") 'image-mode) |
| 712 | auto-mode-alist) | 719 | auto-mode-alist) |
| 713 | (push | 720 | (push |
| 714 | (cons (concat "\\." extension "\\'") 'imagemagick) | 721 | (cons (concat "\\." extension "\\'") 'imagemagick) |
| 715 | image-type-file-name-regexps))))) | 722 | image-type-file-name-regexps))))) |
| 716 | 723 | ||
| 717 | 724 | ||