]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/image/image-converter.el: Support more ImageMagick versions (bug#39994)
authorJuri Linkov <juri@linkov.net>
Sat, 14 Mar 2020 23:58:58 +0000 (01:58 +0200)
committerJuri Linkov <juri@linkov.net>
Sat, 14 Mar 2020 23:58:58 +0000 (01:58 +0200)
* lisp/image/image-converter.el (image-converter--probe): Match
a possible additional second column in some ImageMagick versions
of "convert -list format".

lisp/image/image-converter.el

index 0488a13d41a35a61166baec281363a5313989402..ae3d959892078ba2ccafd4e36fa4c1ba62e6b805 100644 (file)
@@ -149,8 +149,9 @@ data is returned as a string."
       (when (re-search-forward "^-" nil t)
         (forward-line 1)
         ;; Lines look like
-        ;; "      WPG* r--   Word Perfect Graphics".
-        (while (re-search-forward "^ *\\([A-Z0-9]+\\)\\*? +r" nil t)
+        ;; "      WPG* r--   Word Perfect Graphics" or
+        ;; "      WPG* WPG       r--   Word Perfect Graphics".
+        (while (re-search-forward "^ *\\([A-Z0-9]+\\)\\*?\\(?: +[A-Z0-9]+\\)? +r" nil t)
           (push (downcase (match-string 1)) formats)))
       (nreverse formats))))