emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/compat b98e7cc868 39/84: Fix gv-expander for compat-ali


From: ELPA Syncer
Subject: [elpa] externals/compat b98e7cc868 39/84: Fix gv-expander for compat-alist-get
Date: Tue, 3 Jan 2023 08:57:34 -0500 (EST)

branch: externals/compat
commit b98e7cc868020a4ede2f330b73bd5aaead147cfd
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Fix gv-expander for compat-alist-get
    
    We had previously used compat-assoc that is not always defined
    (e.g. when testing).  By giving compat-assoc a realname, we can access
    it in the gv-expander.
---
 compat-26.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compat-26.el b/compat-26.el
index a21b903b93..a7dcf2e7b1 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -123,6 +123,7 @@ Equality is defined by the function TESTFN, defaulting to
 `equal'.  TESTFN is called with 2 arguments: a car of an alist
 element and KEY.  With no optional argument, the function behaves
 just like `assoc'."
+  :realname compat--assoc-handle-testfn
   :prefix t
   (if testfn
       (catch 'found
@@ -169,7 +170,7 @@ from the absolute start of the buffer, disregarding the 
narrowing."
     (macroexp-let2 macroexp-copyable-p k key
       (gv-letplace (getter setter) alist
         (macroexp-let2 nil p `(if (and ,testfn (not (eq ,testfn 'eq)))
-                                  (compat-assoc ,k ,getter ,testfn)
+                                  (compat--assoc-handle-testfn ,k ,getter 
,testfn)
                                 (assq ,k ,getter))
           (funcall do (if (null default) `(cdr ,p)
                         `(if ,p (cdr ,p) ,default))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]