diff options
author | Daniel MartÃn <mardani29@yahoo.es> | 2020-12-14 17:16:00 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-12-14 17:16:00 +0100 |
commit | 0dd8d53344a822842660d2ac75108f40ba9ff0f4 (patch) | |
tree | 8407f41d59ccff3c02acf9d90f3776999b00aa6e /doc | |
parent | 10bc4eac5bb2e7e4b520628286a52f0508332119 (diff) | |
download | emacs-0dd8d53344a822842660d2ac75108f40ba9ff0f4.tar.gz |
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).
Diffstat (limited to 'doc')
-rw-r--r-- | doc/emacs/basic.texi | 5 |
1 files changed, 4 insertions, 1 deletions
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 |