From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thuna Newsgroups: gmane.emacs.bugs Subject: bug#57971: [Patch] Correct the usage of `image-file-name-regexps' Date: Wed, 21 Sep 2022 10:17:16 +0200 Message-ID: <8735clrvjn.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14746"; mail-complaints-to="usenet@ciao.gmane.io" To: 57971@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 21 10:30:13 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oav7V-0003hB-2X for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Sep 2022 10:30:13 +0200 Original-Received: from localhost ([::1]:46696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oav7T-0003v7-Tb for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Sep 2022 04:30:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oauvj-0006j7-RV for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2022 04:18:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33238) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oauvj-00054f-7A for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2022 04:18:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oauvh-0004yO-W7 for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2022 04:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thuna Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2022 08:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166374825219065 (code B ref -1); Wed, 21 Sep 2022 08:18:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Sep 2022 08:17:32 +0000 Original-Received: from localhost ([127.0.0.1]:60548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oauvB-0004xN-4B for submit@debbugs.gnu.org; Wed, 21 Sep 2022 04:17:32 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:42792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oauv6-0004xB-B5 for submit@debbugs.gnu.org; Wed, 21 Sep 2022 04:17:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oauv6-0005nG-4k for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2022 04:17:24 -0400 Original-Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:34482) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oauv4-0004yd-Kk for bug-gnu-emacs@gnu.org; Wed, 21 Sep 2022 04:17:23 -0400 Original-Received: by mail-ej1-x635.google.com with SMTP id y3so11884072ejc.1 for ; Wed, 21 Sep 2022 01:17:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date; bh=2LFbimHUAsjpsdicqeLh6ttoq5frTpzYkASKScb56lQ=; b=on7wwVXMMlHOP0xlPB20R1LrrMXBLdDK4WAI7+HLPstw8HiFCZb/rY0rXw0ecuLKmt Ry0/vj7sAGl2doatNuJ1Z92K/aCFmWh9r5xSefNy/EIPb3v4YcsX/hk24O62y4JzRO2E l46KWAzjAQncOozuLxb9KFEJ7V8ZV6DfizCWW3b3iTv19KXNlN9gNfx1BRr4T56UXMhm KrbhQVR2MTtiD5ljSkXGmTT6K5N/nBzD/PupBz2f37hg/hgfNtd3NxU4vkOOCW0j7XlE pABbZq20Gko3INFpJyC8gdSufvEyMhJIIsusgpyUVNyqWkIMcr3i7jex0bitIcNKDtQP Gysw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date; bh=2LFbimHUAsjpsdicqeLh6ttoq5frTpzYkASKScb56lQ=; b=S5CqA97zDFasEcuDuR78sGUGNOaLu+CpqK1mLZ4M/DytPB5rW5av2/upQL6V1YdQpe aMpZL+WGND9FbpCOsjDVtgCgV4qyuUHCcnRcFRbtmhWMQ8fnVMw8NC6/h0JYpkozN1zJ 6MkZF0sXox4J30nNjTLRBk53v+d3v8OC4/R4Fp6ufa3/H4XVZGAvsI0uJoEVEow4uIsM AZ/iiu6aDW41xc2/7oB56DN6NbmHkDvDQlWRU6Avf3ilebntMQMkFa2YO151EZVFIEax eBYJUPskx1wfksYBZ5gpUj8dyDcbS6rN6Pu447MWXVY1BOxxxGrWr8XKCRPYP0lIvsPc kl7A== X-Gm-Message-State: ACrzQf0eLGaBx4nCbGqEm8V0p604mus9Zf7JPzwSpEoUsCCILMb2cUG4 TLj5D2faY5RaaUSFZvTTAcmE96V9sx8= X-Google-Smtp-Source: AMsMyM73H6mU8RgF+IYb7KGy3ZcJhXFzgIJM0EWUR5ftYtjwCsAryaAyieKD8KsvRt8cxXc16/z9NA== X-Received: by 2002:a17:907:2c4f:b0:77d:f3eb:f079 with SMTP id hf15-20020a1709072c4f00b0077df3ebf079mr19462378ejc.356.1663748240658; Wed, 21 Sep 2022 01:17:20 -0700 (PDT) Original-Received: from thuna ([193.205.22.58]) by smtp.gmail.com with ESMTPSA id x14-20020a056402414e00b0043bea0a48d0sm1384315eda.22.2022.09.21.01.17.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 01:17:20 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=thuna.cing@gmail.com; helo=mail-ej1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:243282 Archived-At: --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Correct-the-usage-of-image-file-name-regexps.patch >From 86c4b8e0510ac4ad9d907bed1720b47968450d08 Mon Sep 17 00:00:00 2001 From: Thuna 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 --=-=-=--