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

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

bug#25190: Initialization of `dired-mode-map' in by the `dired-x' featur


From: Lars Ingebrigtsen
Subject: bug#25190: Initialization of `dired-mode-map' in by the `dired-x' feature is not safe
Date: Wed, 09 Oct 2019 09:41:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

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

> consider the two
>
> ;;; KEY BINDINGS.
>
> (define-key dired-mode-map "\C-x\M-o" 'dired-omit-mode)
> (define-key dired-mode-map "*O" 'dired-mark-omitted)

[...]

> sections.  Both can easily fail.  For instance,
>
> (define-key dired-mode-map "%Y" 'dired-do-relsymlink-regexp)
>
> assumes that the "%" prefix command has been defined in
> `dired-mode-map' which is not at all true for any customization.  The 
> `easy-menu-add-item' calls suffers from similar issue.  It should be
> possible to conditionally disable these code sections or even remove 
> them altogether as they are maldesigned.

I've now added some checks to Emacs 27 to ensure that dired-x doesn't
try to define keys in sub-keymaps that doesn't exist.

-- 
(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]