Subject: Re: bug#25188: Initialization of `global-edebug-map' is not safe

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 09 Oct 2019 09:27:50 +0200

Alexander Shukaev <[email-masked]> writes:

> (global-unset-key global-edebug-prefix)
> (global-set-key global-edebug-prefix global-edebug-map)
>
> and imagine that somebody has customized `global-map' in such a way
> that it has no "\C-x" prefix command at all.  Then of course the above
> code will fail.  Furthermore, if one does not want to pollute the 
> `global-map' with `global-edebug-map', one cannot simply set
> `global-edebug-prefix' to nil because this would also fail.  I believe 
> `global-edebug-map' should support the nil value which would mean that
> the above code is disabled completely.

I've now made it check whether global-edebug-prefix is nil before using
in Emacs 27.

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