GNU bug report logs - #70664
29.3; vtable-insert-object cannot insert at top of table

Previous Next

Package: emacs;

Reported by: Joost Kremers <joostkremers <at> fastmail.fm>

Date: Tue, 30 Apr 2024 09:32:02 UTC

Severity: normal

Found in version 29.3

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Adam Porter <adam <at> alphapapa.net>
To: Joost Kremers <joostkremers <at> fastmail.fm>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 70664 <at> debbugs.gnu.org
Subject: bug#70664: 29.3; vtable-insert-object cannot insert at top of table
Date: Thu, 2 May 2024 04:54:33 -0500
To be clear, I don't plan to work on this anytime soon.  :)

Having said that, using a special value for AFTER-OBJECT to insert first 
would probably be a good idea, because it seems like it should be 
possible to do that, and it wouldn't require changing the signature.

Beyond that, IMHO it might be good to write a function with a different 
signature that would allow more flexibility, e.g.

(cl-defun vtable-add (object table &key after before at)
  "Add OBJECT to TABLE at specified position.
AFTER may be an object after which to insert it; or BEFORE may be an 
object before which to insert it; or AT may be an integer position at 
which to insert the object, 0 meaning first and -1 meaning last (only 
one of these three arguments should be given).")

Then the old function could be deprecated.




This bug report was last modified 1 year and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.