unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57971: [Patch] Correct the usage of `image-file-name-regexps'
@ 2022-09-21  8:17 Thuna
  2022-09-21 11:53 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Thuna @ 2022-09-21  8:17 UTC (permalink / raw)
  To: 57971

[-- Attachment #1: Type: text/plain, Size: 248 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Correct-the-usage-of-image-file-name-regexps.patch --]
[-- Type: text/x-patch, Size: 972 bytes --]

From 86c4b8e0510ac4ad9d907bed1720b47968450d08 Mon Sep 17 00:00:00 2001
From: Thuna <thuna.cing@gmail.com>
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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#57971: [Patch] Correct the usage of `image-file-name-regexps'
  2022-09-21  8:17 bug#57971: [Patch] Correct the usage of `image-file-name-regexps' Thuna
@ 2022-09-21 11:53 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-21 11:53 UTC (permalink / raw)
  To: Thuna; +Cc: 57971

Thuna <thuna.cing@gmail.com> writes:

> 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

Thanks; pushed to Emacs 29.

If I'm counting correctly, this was the third patch applied, but the
number of new lines is still below the limit, so using
"Copyright-paperwork-exempt: yes" is still fine, but probably any further
patches will require FSF copyright assignment.






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-21 11:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21  8:17 bug#57971: [Patch] Correct the usage of `image-file-name-regexps' Thuna
2022-09-21 11:53 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).