bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25189: Use `current-global-map' in `comint-insert-input'


From: Lars Ingebrigtsen
Subject: bug#25189: Use `current-global-map' in `comint-insert-input'
Date: Wed, 25 Dec 2019 22:39:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.60 (gnu/linux)

Alexander Shukaev <emacs@Alexander.Shukaev.name> writes:

>> The value is a keymap that is usually (but not necessarily) Emacs’s
>> global map.
>
> So it's not necessarily the current global keymap.  Hence, applying
> `define-key' (or any other mutating function to it), may not take any 
> effect and do what is expected.  It is safer to always use
> `current-global-map'.  At least that is my understanding why there are 
> special functions like `current-global-map' for accessing and
> `use-global-map' for assignment.

I'm unable to read any such thing from the documentation (or usage) of
those functions.  A handful of places use use-global-map to alter what
global map is in usage, and I see no indication that functions like
comint-insert-input would want to alter these other maps instead of
(the real) global-map.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]