I am writing a function to insert register “N”.
The problem is that when I insert the register, it puts point before the inserted register, while I would like the point to be after whatever register I inserted.
I tried to accomplish this by trying to set-command-mark (C-SPC) two times, followed by inserting register, and then popping the mark twice (C-u C-SPC *2). I wanted to do this macro free though, the problem is that I don’t know what argument to feed it to help set-command-mark. Maybe someone knows how to get it working that way, or has a better idea?
More code if needed to illustrate the case:
(defun Navi-insert-register ()
(interactive)
(set-mark-command)
(set-mark-command)
(insert-register ?N)
...
)
From insert-register documentation
Just pass the second parameter as
t.