1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00

* 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).
This commit is contained in:
Juri Linkov 2020-03-30 02:16:12 +03:00
parent 461bd9cc20
commit c6e0981b96

View File

@ -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))