From: Stefan Kangas <stefankangas@gmail.com>
To: 59224-done@debbugs.gnu.org
Cc: Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#59224: 29.0.50; Don't use defvar+make-sparse-keymap for example in docs
Date: Sun, 10 Sep 2023 16:51:25 -0700 [thread overview]
Message-ID: <CADwFkmnD9eW4Xibo_CanA7kw=FVTg2BOq4egmF=6vnpP=bem_w@mail.gmail.com> (raw)
In-Reply-To: <CADwFkmkBC7pPshPRcR9WxOi5YWjk0Xg4sR_pkA5En2kPkKVCYw@mail.gmail.com> (Stefan Kangas's message of "Sat, 12 Nov 2022 12:02:31 -0800")
Version: 29.2
Stefan Kangas <stefankangas@gmail.com> writes:
> 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'?
I've now changed this example to `make-syntax-table' on emacs-29.
If anyone can think of a better example, please speak up and we can
reopen the bug for further tweaking.
prev parent reply other threads:[~2023-09-10 23:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-12 20:02 bug#59224: 29.0.50; Don't use defvar+make-sparse-keymap for example in docs Stefan Kangas
2023-09-10 23:51 ` Stefan Kangas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkmnD9eW4Xibo_CanA7kw=FVTg2BOq4egmF=6vnpP=bem_w@mail.gmail.com' \
--to=stefankangas@gmail.com \
--cc=59224-done@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.