diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-11-29 23:54:48 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-11-29 23:55:00 +0100 |
commit | 1efc14561d6ec735cd35ac5e8124c4c244b1f1a2 (patch) | |
tree | 9e699f8d5d7a7fddf0b7e30ba5c50ea8d221ea61 /doc/lispref/text.texi | |
parent | 50379fb78d04deb9f422b906add126219a1a775d (diff) | |
download | emacs-1efc14561d6ec735cd35ac5e8124c4c244b1f1a2.tar.gz |
Edit the lispref manual for define-key/keymap-set fallout
* doc/lispref/variables.texi (Tips for Defining):
* doc/lispref/text.texi (Clickable Text):
* doc/lispref/modes.texi (Derived Modes):
(Example Major Modes):
* doc/lispref/loading.texi (Autoload):
(Hooks for Loading):
* doc/lispref/keymaps.texi (Creating Keymaps):
(Inheritance and Keymaps):
(Controlling Active Maps):
(Changing Key Bindings):
(Low-Level Key Binding):
(Remapping Commands):
(Translation Keymaps):
(Key Binding Commands):
* doc/lispref/help.texi (Help Functions):
* doc/lispref/display.texi (Abstract Display Example):
* doc/lispref/commands.texi (Interactive Codes):
(Keyboard Events):
(Misc Events):
(Classifying Events):
(Strings of Events): Prefer `keymap-set' instead of `define-key'
most places, and use `defvar-keymap' in some of the examples.
Diffstat (limited to 'doc/lispref/text.texi')
-rw-r--r-- | doc/lispref/text.texi | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 863b318c205..25579e79eae 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -4195,7 +4195,7 @@ position. The action code is always @code{t}. For example, here is how Info mode handles @key{mouse-1}: @smallexample -(define-key Info-mode-map [follow-link] 'mouse-face) +(keymap-set Info-mode-map "<follow-link>" 'mouse-face) @end smallexample @item a function @@ -4208,9 +4208,9 @@ For example, here is how pcvs enables @kbd{mouse-1} to follow links on file names only: @smallexample -(define-key map [follow-link] - (lambda (pos) - (eq (get-char-property pos 'face) 'cvs-filename-face))) +(keymap-set map "<follow-link>" + (lambda (pos) + (eq (get-char-property pos 'face) 'cvs-filename-face))) @end smallexample @item anything else |