mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Save position in mark ring before jumping to definition
* lisp/help-mode.el (help-function-def--button-function): Current point is saved in the mark ring before jumping to definition.
This commit is contained in:
parent
44c13eefe8
commit
2e92f90a5d
2 changed files with 11 additions and 0 deletions
7
etc/NEWS
7
etc/NEWS
|
|
@ -30,6 +30,13 @@ applies, and please also update docstrings as needed.
|
|||
|
||||
* Changes in Emacs 29.1
|
||||
|
||||
** Help
|
||||
|
||||
---
|
||||
*** Jumping to function/variable source now saves mark before moving point.
|
||||
Jumping to source from "*Help*" buffer moves the point when the source
|
||||
buffer is already open. Now, the old point is pushed to mark ring.
|
||||
|
||||
|
||||
* Editing Changes in Emacs 29.1
|
||||
|
||||
|
|
|
|||
|
|
@ -273,6 +273,10 @@ The format is (FUNCTION ARGS...).")
|
|||
(when (or (< position (point-min))
|
||||
(> position (point-max)))
|
||||
(widen))
|
||||
;; Save mark for the old location, unless the point is not
|
||||
;; actually going to move.
|
||||
(unless (= (point) position)
|
||||
(push-mark nil t))
|
||||
(goto-char position))
|
||||
(message "Unable to find location in file")))))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue