Subject: bug#69664: closed (Re: bug#69664: [PATCH] 29.2; vtable-update-object does not work)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 14 Mar 2024 08:51:02 +0000

Your bug report

#69664: [PATCH] 29.2; vtable-update-object does not work

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
69664: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69664
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#69664: [PATCH] 29.2; vtable-update-object does not work
From: Eli Zaretskii <[email-masked]>
To: Adam Porter <[email-masked]>
Cc: [email-masked]
Date: Thu, 14 Mar 2024 10:49:32 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Fri, 8 Mar 2024 22:39:42 -0600
> From: Adam Porter <[email-masked]>
> 
> Please see the attached patch that fixes the function 
> 'vtable-update-object', which does not currently work.  With this 
> change, it seems to work.

Thanks, installed on the master branch, and closing the bug.

Subject: [PATCH] 29.2; vtable-update-object does not work
From: Adam Porter <[email-masked]>
To: [email-masked]
Date: Fri, 8 Mar 2024 22:39:42 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Please see the attached patch that fixes the function 
'vtable-update-object', which does not currently work.  With this 
change, it seems to work.

Thanks,
Adam

From 9215bc55416dda1245c75cdb429ec4ad0ed46d20 Mon Sep 17 00:00:00 2001
From: Adam Porter <[email-masked]>
Date: Fri, 8 Mar 2024 22:28:52 -0600
Subject: [PATCH] * lisp/emacs-lisp/vtable.el (vtable-update-object): Fix

The order of the arguments to 'seq-position' was wrong, and it did not
compare the correct values.
---
 lisp/emacs-lisp/vtable.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/vtable.el b/lisp/emacs-lisp/vtable.el
index 02020552e7f..5cf8d8854bb 100644
--- a/lisp/emacs-lisp/vtable.el
+++ b/lisp/emacs-lisp/vtable.el
@@ -300,7 +300,9 @@ vtable-update-object
         (error "Can't find the old object"))
       (setcar (cdr objects) object))
     ;; Then update the cache...
-    (let* ((line-number (seq-position old-object (car (vtable--cache table))))
+    (let* ((line-number (seq-position (car (vtable--cache table)) old-object
+                                      (lambda (a b)
+                                        (equal (car a) b))))
            (line (elt (car (vtable--cache table)) line-number)))
       (unless line
         (error "Can't find cached object"))
-- 
2.30.2