From 72834e10a691114e39a9ad3d3abe93ae9ae83d11 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 11 Jun 2012 18:16:47 +0800 Subject: [PATCH] Give ImageMagick lowest priority in image-type-file-name-regexps. * lisp/image.el (imagemagick-register-types): Put the ImageMagick entry at the end of image-type-file-name-regexps. --- lisp/ChangeLog | 5 +++++ lisp/image.el | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 026e84058ef..6872e3d2235 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-06-11 Chong Yidong + + * image.el (imagemagick-register-types): Put the ImageMagick entry + at the end of image-type-file-name-regexps. + 2012-06-11 Johan Bockgård * emacs-lisp/pcase.el (pcase-UPAT, pcase-QPAT): New edebug specs. diff --git a/lisp/image.el b/lisp/image.el index a47e945c26a..f5a2de5e595 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -747,7 +747,10 @@ If Emacs is compiled without ImageMagick support, this does nothing." (push (cons re 'image-mode) auto-mode-alist)) (if itfnr-elt (setcar itfnr-elt re) - (push (cons re 'imagemagick) image-type-file-name-regexps))) + ;; Append to `image-type-file-name-regexps', so that we + ;; preferentially use specialized image libraries. + (add-to-list 'image-type-file-name-regexps + (cons re 'imagemagick) t))) (setq imagemagick--file-regexp re)))) (defcustom imagemagick-types-inhibit -- 2.11.4.GIT