unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#69664: [PATCH] 29.2; vtable-update-object does not work
@ 2024-03-09  4:39 Adam Porter
  2024-03-12 21:06 ` bug#69664: Additional patch Adam Porter
  2024-03-14  8:49 ` bug#69664: [PATCH] 29.2; vtable-update-object does not work Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: Adam Porter @ 2024-03-09  4:39 UTC (permalink / raw)
  To: 69664

[-- Attachment #1: Type: text/plain, Size: 169 bytes --]

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

[-- Attachment #2: 0001-lisp-emacs-lisp-vtable.el-vtable-update-object-Fix.patch --]
[-- Type: text/x-patch, Size: 1152 bytes --]

From 9215bc55416dda1245c75cdb429ec4ad0ed46d20 Mon Sep 17 00:00:00 2001
From: Adam Porter <adam@alphapapa.net>
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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-14 10:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-09  4:39 bug#69664: [PATCH] 29.2; vtable-update-object does not work Adam Porter
2024-03-12 21:06 ` bug#69664: Additional patch Adam Porter
2024-03-13  7:58   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-14 10:50   ` Eli Zaretskii
2024-03-14  8:49 ` bug#69664: [PATCH] 29.2; vtable-update-object does not work Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).