For example, I have a list:
(setq foo '(1 2 3 4 5))
Then I need to get a pointer to its third index element (which contains 4in the example):
(setq p (SOME_FUNCTION foo 3))
An item with address p can be moved to another list, so I cannot just save its current index foo.
And I will need to say later:
(push 0 foo)
=> (0 1 2 3 4 5)
(setf p 444)
and the list fooshould be (0 1 2 3 444 5)after.
Is this possible in Emacs lisp?
source
share