From e69df5166910ac0581c1ae66159b741294904006 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 16 Sep 2011 09:46:42 -0400 Subject: [PATCH] * lisp/image.el (imagemagick-register-types): Use regexp-opt. --- lisp/ChangeLog | 11 ++++++++--- lisp/image.el | 18 ++++++++---------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 57c623df56a..deded0ff5f0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-09-16 Stefan Monnier + + * image.el (imagemagick-register-types): Use regexp-opt. + 2011-09-15 Chong Yidong * window.el (display-buffer-base-action): Rename from @@ -13,8 +17,8 @@ with an older version, remove it. (package-menu-mark-delete, package-menu-mark-install) (package-menu-mark-unmark): Make unused args optional. - (package-menu-mark-obsolete-for-deletion): Use - package-menu-get-status instead of a regexp search. + (package-menu-mark-obsolete-for-deletion): + Use package-menu-get-status instead of a regexp search. (package-menu-get-status): Use tabulated-list-entry. (package-menu-mark-upgrades): New command. (package-menu-mode-map): Bind it to U. Add it to menu bar. @@ -296,7 +300,8 @@ 2011-09-10 Reuben Thomas - * simple.el (count-words-region): Use buffer if there's no region. + * simple.el (count-words-region): Use buffer if there's no region + (bug#9429). 2011-09-09 Juri Linkov diff --git a/lisp/image.el b/lisp/image.el index 30362251664..c150f4239dd 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -695,16 +695,14 @@ Emacs visits them in Image mode. If Emacs is compiled without ImageMagick support, do nothing." (when (fboundp 'imagemagick-types) - (let ((im-types (imagemagick-types))) - (dolist (im-inhibit imagemagick-types-inhibit) - (setq im-types (delq im-inhibit im-types))) - (dolist (im-type im-types) - (let ((extension - (concat "\\." (downcase (symbol-name im-type)) - "\\'"))) - (push (cons extension 'image-mode) auto-mode-alist) - (push (cons extension 'imagemagick) - image-type-file-name-regexps)))))) + (let ((im-types '())) + (dolist (im-type (imagemagick-types)) + (unless (memq im-type imagemagick-types-inhibit) + (push (downcase (symbol-name im-type)) im-types))) + (let ((extension (concat "\\." (regexp-opt im-types) "\\'"))) + (push (cons extension 'image-mode) auto-mode-alist) + (push (cons extension 'imagemagick) + image-type-file-name-regexps))))) (provide 'image) -- 2.39.2