Subject: [Patch] Correct the usage of `image-file-name-regexps'

From: Thuna <[email-masked]>
Date: Wed, 21 Sep 2022 10:17:16 +0200

The variable name, documentation, and the defcustom of
`image-file-name-regexps' seems to suggest that it is a list of regexps,
however the function `image-file-name-regexp' treats it like a single
regexp instead.

Copyright-paperwork-exempt: yes

>From 86c4b8e0510ac4ad9d907bed1720b47968450d08 Mon Sep 17 00:00:00 2001
From: Thuna <[email-masked]>
Date: Wed, 21 Sep 2022 09:51:31 +0200
Subject: [PATCH] Correct the usage of `image-file-name-regexps'

* lisp/image-file.el (image-file-name-regexp): Treat
`image-file-name-regexps' as a list of regexps instead of a regexp.
---
 lisp/image-file.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/image-file.el b/lisp/image-file.el
index 0ed88e8e74..e97fb179ee 100644
--- a/lisp/image-file.el
+++ b/lisp/image-file.el
@@ -91,9 +91,9 @@ image-file-name-regexp
 		      "\\'"))))
     (mapconcat
      #'identity
-     (delq nil (list exts-regexp
-		     image-file-name-regexps
-		     (car (rassq 'imagemagick image-type-file-name-regexps))))
+     (delq nil (nconc (list exts-regexp
+                            (car (rassq 'imagemagick image-type-file-name-regexps)))
+		      image-file-name-regexps))
      "\\|")))

-- 
2.35.1