]> git.eshelyaron.com Git - emacs.git/commitdiff
Include ImageMagick file name regexps in image-file-name-regexp
authorJuri Linkov <juri@jurta.org>
Thu, 26 Sep 2019 19:26:27 +0000 (21:26 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 26 Sep 2019 19:26:33 +0000 (21:26 +0200)
* lisp/image-file.el (image-file-name-regexp): If compiled with
ImageMagick, include file name extensions it can handle (bug#9516).

lisp/image-file.el

index c1d44a7d6d6a00ece988f1108ff473b48f8bf6ea..6f4ee7a953ba7f73481fa6a80767a8557e1382a8 100644 (file)
@@ -85,13 +85,12 @@ the variable is set using \\[customize]."
                                         image-file-name-extensions)
                                  t)
                      "\\'"))))
-    (if image-file-name-regexps
-       (mapconcat 'identity
-                  (if exts-regexp
-                      (cons exts-regexp image-file-name-regexps)
-                    image-file-name-regexps)
-                  "\\|")
-      exts-regexp)))
+    (mapconcat
+     'identity
+     (delq nil (list exts-regexp
+                    image-file-name-regexps
+                    (car (rassq 'imagemagick image-type-file-name-regexps))))
+     "\\|")))
 
 
 ;;;###autoload