summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles A. Roelli <charles@aurox.ch>2018-07-14 15:12:36 +0200
committerCharles A. Roelli <charles@aurox.ch>2018-07-14 15:14:25 +0200
commit155d7303808345dd73427302d9a352ec5461c11a (patch)
treef0e458c65594f7b0a88dd929ff331f00db928ff4
parent5936f6cdac09aa2f420f7f3756cf77629af99344 (diff)
downloademacs-155d7303808345dd73427302d9a352ec5461c11a.tar.gz
Add to documentation of 'jump-to-register'
* lisp/register.el (jump-to-register): * doc/emacs/regs.texi (Position Registers): Document that jumping to a register can push the mark.
-rw-r--r--doc/emacs/regs.texi4
-rw-r--r--lisp/register.el1
2 files changed, 4 insertions, 1 deletions
diff --git a/doc/emacs/regs.texi b/doc/emacs/regs.texi
index 7d16d539128..98eed064536 100644
--- a/doc/emacs/regs.texi
+++ b/doc/emacs/regs.texi
@@ -80,7 +80,9 @@ information until you store something else in it.
@kindex C-x r j
@findex jump-to-register
The command @kbd{C-x r j @var{r}} switches to the buffer recorded in
-register @var{r}, and moves point to the recorded position. The
+register @var{r}, pushes a mark, and moves point to the recorded
+position. (The mark is not pushed if point was already at the
+recorded position, or in successive calls to the command.) The
contents of the register are not changed, so you can jump to the saved
position any number of times.
diff --git a/lisp/register.el b/lisp/register.el
index 77d84c047a9..3d61044c03c 100644
--- a/lisp/register.el
+++ b/lisp/register.el
@@ -231,6 +231,7 @@ Interactively, reads the register using `register-read-with-preview'."
(defalias 'register-to-point 'jump-to-register)
(defun jump-to-register (register &optional delete)
"Move point to location stored in a register.
+Push the mark if jumping moves point, unless called in succession.
If the register contains a file name, find that file.
\(To put a file name in a register, you must use `set-register'.)
If the register contains a window configuration (one frame) or a frameset