From: Lars Ingebrigtsen Date: Mon, 29 Nov 2021 23:14:51 +0000 (+0100) Subject: Audit the Emacs manual for keymap-*-related changes X-Git-Tag: emacs-29.0.90~3639^2~3 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=804c69dafd686b386630b125182e66551dd592f4;p=emacs.git Audit the Emacs manual for keymap-*-related changes * doc/emacs/programs.texi (Other C Commands): * doc/emacs/msdos-xtra.texi (MS-DOS Keyboard): * doc/emacs/custom.texi (Init Examples): * doc/emacs/abbrevs.texi (Editing Abbrevs): Change some examples to use keymap-* functions. --- diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi index c83da8aaec6..972416ff1cd 100644 --- a/doc/emacs/abbrevs.texi +++ b/doc/emacs/abbrevs.texi @@ -274,7 +274,7 @@ Edit a list of abbrevs; you can add, alter or remove definitions. @example @var{various other tables@dots{}} (lisp-mode-abbrev-table) -"dk" 0 "define-key" +"ks" 0 "keymap-set" (global-abbrev-table) "dfn" 0 "definition" @end example diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 917f6f49214..310a8563aef 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -2567,10 +2567,9 @@ Do the same thing for Lisp mode only. Redefine all keys which now run @code{next-line} in Fundamental mode so that they run @code{forward-line} instead. -@findex substitute-key-definition +@findex keymap-substitute @example -(substitute-key-definition 'next-line 'forward-line - global-map) +(keymap-substitute global-map 'next-line 'forward-line) @end example @item diff --git a/doc/emacs/msdos-xtra.texi b/doc/emacs/msdos-xtra.texi index fce6ae46f81..114700f08d3 100644 --- a/doc/emacs/msdos-xtra.texi +++ b/doc/emacs/msdos-xtra.texi @@ -105,7 +105,7 @@ following line into your @file{_emacs} file: @smallexample ;; @r{Make the @key{ENTER} key from the numeric keypad act as @kbd{C-j}.} -(define-key function-key-map [kp-enter] [?\C-j]) +(keymap-set function-key-map "" "C-j") @end smallexample @node MS-DOS Mouse diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 0056906e1f7..85ed65a4954 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -1827,7 +1827,7 @@ sure the keymap is loaded before we try to change it. @example (defun my-bind-clb () - (define-key c-mode-base-map "\C-m" + (keymap-set c-mode-base-map "RET" 'c-context-line-break)) (add-hook 'c-initialization-hook 'my-bind-clb) @end example