[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37943: assoc-default is wrongly flagged as side-effect-free.
From: |
Alan Mackenzie |
Subject: |
bug#37943: assoc-default is wrongly flagged as side-effect-free. |
Date: |
Sun, 27 Oct 2019 12:24:55 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
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).
- bug#37943: assoc-default is wrongly flagged as side-effect-free.,
Alan Mackenzie <=