From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#37943: assoc-default is wrongly flagged as side-effect-free. Date: Sun, 27 Oct 2019 12:24:55 +0000 Message-ID: <20191027122455.GB27491@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="213580"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) To: 37943@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 27 13:26:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iOhcb-000tQS-QY for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Oct 2019 13:26:13 +0100 Original-Received: from localhost ([::1]:45096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOhca-000635-KK for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Oct 2019 08:26:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53875) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOhcT-0005yx-Gp for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 08:26:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOhcS-00069u-L4 for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 08:26:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32952) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iOhcS-00069n-HF for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 08:26:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iOhcS-00068f-CI for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 08:26:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Oct 2019 12:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37943 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157217910523514 (code B ref -1); Sun, 27 Oct 2019 12:26:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Oct 2019 12:25:05 +0000 Original-Received: from localhost ([127.0.0.1]:41773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOhbV-000676-7A for submit@debbugs.gnu.org; Sun, 27 Oct 2019 08:25:05 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:48740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOhbR-00066c-1a for submit@debbugs.gnu.org; Sun, 27 Oct 2019 08:25:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53754) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOhbQ-0004PH-1p for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 08:25:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOhbP-0005kI-0Y for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 08:24:59 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:26985 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1iOhbO-0005ih-MY for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 08:24:58 -0400 Original-Received: (qmail 23553 invoked by uid 3782); 27 Oct 2019 12:24:56 -0000 Original-Received: from acm.muc.de (p2E5D5E17.dip0.t-ipconnect.de [46.93.94.23]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 27 Oct 2019 13:24:55 +0100 Original-Received: (qmail 28041 invoked by uid 1000); 27 Oct 2019 12:24:55 -0000 Content-Disposition: inline X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:170243 Archived-At: Hello, Emacs. Emacs 27. In the source for assoc-default (in subr.el) appears (declare (side-effect-free t)) . This is not true when the TEST argument to assoc-default itself changes the match-data. I suggest removing this declaration from the function rather than amending the code with a save-match-data. There are calls to assoc-default in set-auto-mode where the caller relies on the match data set by the function when TEST is string-match. :-( -- Alan Mackenzie (Nuremberg, Germany).