I have a function that moves to the end of line, but when already at end of line, moves back to the last point where it was called before.
This requires the value of that last point to be stored somewhere.
Currently I'm storing this point in e.g (defvar last-point 1)
, but I think
it would be better for encapsulation (well, consistency maybe since it will still
be visible to the outside) to use (put 'my-move-end-of-line 'last-point 1)
and (get 'my-move-end-of-line 'last-point)
.
Any disadvantages to doing this?