From: Juri Linkov Date: Thu, 26 Sep 2019 19:26:27 +0000 (+0200) Subject: Include ImageMagick file name regexps in image-file-name-regexp X-Git-Tag: emacs-27.0.90~1417 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=648a6b7e912c97f9f4190cfd401274a2a33f31da;p=emacs.git Include ImageMagick file name regexps in image-file-name-regexp * lisp/image-file.el (image-file-name-regexp): If compiled with ImageMagick, include file name extensions it can handle (bug#9516). --- diff --git a/lisp/image-file.el b/lisp/image-file.el index c1d44a7d6d6..6f4ee7a953b 100644 --- a/lisp/image-file.el +++ b/lisp/image-file.el @@ -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