[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25187: Initialization of `shell-mode-map' is not safe
From: |
Lars Ingebrigtsen |
Subject: |
bug#25187: Initialization of `shell-mode-map' is not safe |
Date: |
Wed, 09 Oct 2019 09:24:15 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
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 in Thread] |
Current Thread |
[Next in Thread] |
- bug#25187: Initialization of `shell-mode-map' is not safe,
Lars Ingebrigtsen <=