From cf28598990cb374f6e3bedb0b5c49e0ccc861477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barra=20=C3=93=20Cath=C3=A1in?= Date: Sat, 3 Feb 2024 20:43:05 +0000 Subject: [PATCH 4/4] Documentation in Info for new register commands Simple modification to regs.texi to refer to the new register commands. --- doc/emacs/regs.texi | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/emacs/regs.texi b/doc/emacs/regs.texi index cac5b32c566..e9fb2c74773 100644 --- a/doc/emacs/regs.texi +++ b/doc/emacs/regs.texi @@ -291,11 +291,13 @@ numeric argument stores zero in the register. @cindex saving buffer name in a register If you visit certain file names frequently, you can visit them more -conveniently if you put their names in registers. Here's the Lisp code -used to put a file @var{name} into register @var{r}: +conveniently if you put their names in registers. You may use @kbd{C-x +r F} to place the currently visited file in a register. + +Here's the Lisp code used to put a file @var{name} into register @var{r}: @smallexample -(set-register @var{r} '(file . @var{name})) +(file-to-register @var{r} @var{name}) @end smallexample @need 3000 @@ -303,7 +305,7 @@ used to put a file @var{name} into register @var{r}: For example, @smallexample -(set-register ?z '(file . "/gd/gnu/emacs/19.0/src/ChangeLog")) +(file-to-register ?z "/gd/gnu/emacs/19.0/src/ChangeLog") @end smallexample @noindent @@ -314,12 +316,13 @@ puts the file name shown in register @samp{z}. restore a frame configuration.) Similarly, if there are certain buffers you visit frequently, you -can put their names in registers. For instance, if you visit the +can put their names in registers. You may use @kbd{C-x r B} to store +the current buffer in a register. Or, for instance, if you visit the @samp{*Messages*} buffer often, you can use the following snippet to put that buffer into the @samp{m} register: @smallexample -(set-register ?m '(buffer . "*Messages*")) +(buffer-to-register ?m "*Messages*") @end smallexample To switch to the buffer whose name is in register @var{r}, type -- 2.43.0