From: Lars Ingebrigtsen <larsi@gnus.org>
To: Alexander Shukaev <emacs@Alexander.Shukaev.name>
Cc: 25187@debbugs.gnu.org
Subject: bug#25187: Initialization of `shell-mode-map' is not safe
Date: Wed, 09 Oct 2019 09:24:15 +0200 [thread overview]
Message-ID: <87d0f6qt40.fsf@gnus.org> (raw)
In-Reply-To: <49c53840-659f-5e60-a1d9-161a7e1d8004@Alexander.Shukaev.name> (Alexander Shukaev's message of "Tue, 13 Dec 2016 00:08:07 +0100")
Alexander Shukaev <emacs@Alexander.Shukaev.name> writes:
> consider
>
> (defvar shell-mode-map
> (let ((map (nconc (make-sparse-keymap) comint-mode-map)))
[...]
> from 'shell.el'. When somebody decides to customize `comint-mode-map'
> by, for example, first wiping it out and then filling it again,
>
> (with-eval-after-load 'comint
> ;; Wipe `comint-mode-map':
> (setcdr comint-mode-map nil)
> ;; Fill `comint-mode-map':
> ...)
>
> then when the `shell' feature is loaded, it will inevitably fail
> because `(lookup-key comint-mode-map [menu-bar completion])' may no
> longer return a keymap but rather nil or a number.
I've now fixed this in Emacs 27 by just removing the nconc from the
shell mode map -- shell-mode is derived from comint-mode, so it
automatically inherits its map.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
prev parent reply other threads:[~2019-10-09 7:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-12 23:08 bug#25187: Initialization of `shell-mode-map' is not safe Alexander Shukaev
2019-10-09 7:24 ` Lars Ingebrigtsen [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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d0f6qt40.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=25187@debbugs.gnu.org \
--cc=emacs@Alexander.Shukaev.name \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).