feature: Add going to exact location on jumping back and forward#53
feature: Add going to exact location on jumping back and forward#53pkradiator wants to merge 1 commit into
Conversation
| (interactive) | ||
| (unless (cadr devdocs--stack) | ||
| (user-error "No previous entry")) | ||
| (setcar devdocs--stack (cons (cons 'saved-point (point)) (car devdocs--stack))) |
There was a problem hiding this comment.
Do you mean (push `(saved-point . ,(point)) (car devdocs--stack))?
Also, we can name that property just point.
There was a problem hiding this comment.
Or better, actually: (setf (alist-get 'saved-point (car devdocs--stack)) (point)).
| (current-buffer))) | ||
| (devdocs-goto-target) | ||
| (if .saved-point | ||
| (goto-char (min .saved-point (point-max))) |
There was a problem hiding this comment.
Okay, good catch. But also (point-min) might not be 1. So we should save (- (point) (point-mix)) and jump to (min (point-max) (+ saved-point (point-mix))).
(So really we should rather call saved-point position or something.)
|
This is small enough to accept without the FSF copyright papers, but do you happen to have them? |
Can you elaborate or link to them with related policy? |
|
It's exaplained here: https://www.gnu.org/software/emacs/manual/html_node/emacs/Copyright-Assignment.html It doesn't matter for now, only if you intend to make more contributions to GNU ELPA packages or to Emacs itself. |
Fix #52