From c6e0981b96eaa12c28b70c949ccd6e426c13df4d Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 30 Mar 2020 02:16:12 +0300 Subject: [PATCH] * 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). --- lisp/image/image-converter.el | 4 ++++ 1 file changed, 4 insertions(+) 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)) -- 2.39.2