From: Juri Linkov Date: Sun, 29 Mar 2020 23:16:12 +0000 (+0300) Subject: * lisp/image/image-converter.el: Fix customization of image-converter. X-Git-Tag: emacs-27.0.91~49 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c6e0981b96;p=emacs.git * lisp/image/image-converter.el: Fix customization of image-converter. * lisp/image/image-converter.el (image-convert-p): Update image-converter-regexp when image-converter was customized (bug#39994). --- diff --git a/lisp/image/image-converter.el b/lisp/image/image-converter.el index ae3d9598920..b694052f5b9 100644 --- a/lisp/image/image-converter.el +++ b/lisp/image/image-converter.el @@ -57,6 +57,10 @@ is a string, it should be a MIME format string like ;; Find an installed image converter. (unless image-converter (image-converter--find-converter)) + ;; When image-converter was customized + (if (and image-converter (not image-converter-regexp)) + (when-let ((formats (image-converter--probe image-converter))) + (setq image-converter-regexp (concat "\\." (regexp-opt formats) "\\'")))) (and image-converter (or (and (not data-p) (string-match image-converter-regexp source))