[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59224: 29.0.50; Don't use defvar+make-sparse-keymap for example in d
From: |
Stefan Kangas |
Subject: |
bug#59224: 29.0.50; Don't use defvar+make-sparse-keymap for example in docs |
Date: |
Sat, 12 Nov 2022 12:02:31 -0800 |
Severity: wishlist
In (info "(elisp) Tips for Defining"), we have:
When defining and initializing a variable that holds a
complicated value (such as a keymap with bindings in it), it’s best
to put the entire computation of the value into the ‘defvar’, like
this:
(defvar my-mode-map
(let ((map (make-sparse-keymap)))
(keymap-set map "C-c C-a" 'my-command)
...
map)
DOCSTRING)
Could we use an example here that is not a keymap (which should be
defined using `defvar-keymap' these days)?
What would be a good example to use? `make-syntax-table'?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#59224: 29.0.50; Don't use defvar+make-sparse-keymap for example in docs,
Stefan Kangas <=