]> git.eshelyaron.com Git - emacs.git/commit
alist-get testfn argument evaluation correction
authorMattias Engdegård <mattiase@acm.org>
Fri, 16 Dec 2022 10:08:02 +0000 (11:08 +0100)
committerMattias Engdegård <mattiase@acm.org>
Mon, 19 Dec 2022 12:19:09 +0000 (13:19 +0100)
commit91d6b734216ed95f99f1f82ec6c1afd54af1c4dd
tree932ec96bc7d70ca79235baa2aa421e9122f7c099
parent7f00dbe81a47d0b4dd18d28ebd18eb1448e8e377
alist-get testfn argument evaluation correction

* lisp/emacs-lisp/gv.el (alist-get):
Evaluate TESTFN exactly once (previously up to 3 times).
Reduce the macro-expansion to include a call to either assoc or assq,
not both; this reduces the generated code size in some cases.
lisp/emacs-lisp/gv.el