From 0dd8d53344a822842660d2ac75108f40ba9ff0f4 Mon Sep 17 00:00:00 2001 From: Daniel Martín Date: Mon, 14 Dec 2020 17:16:00 +0100 Subject: Make goto-char offer the number at point as default * lisp/subr.el (read-natnum-interactive): New function to read natural numbers for interactive functions. * src/editfns.c (Fgoto_char): Call read-natnum-interactive from the interactive definition of goto-char to offer the number at point as default. Also expand the docstring to document this new interactive behavior. * doc/emacs/basic.texi (Moving Point): Expand the Emacs manual to document this new behavior. * etc/NEWS: And announce it (bug#45199). --- doc/emacs/basic.texi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc/emacs/basic.texi') diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index cd1ffbebd7c..77c80547462 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -310,7 +310,10 @@ Scroll one screen backward, and move point onscreen if necessary @kindex M-g c @findex goto-char Read a number @var{n} and move point to buffer position @var{n}. -Position 1 is the beginning of the buffer. +Position 1 is the beginning of the buffer. If point is on or just +after a number in the buffer, that is the default for @var{n}. Just +type @key{RET} in the minibuffer to use it. You can also specify +@var{n} by giving @kbd{M-g c} a numeric prefix argument. @item M-g M-g @itemx M-g g -- cgit v1.2.3