unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Alexander Shukaev <emacs@Alexander.Shukaev.name>
Cc: 25190@debbugs.gnu.org
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	[thread overview]
Message-ID: <871rvmqsc1.fsf@gnus.org> (raw)
In-Reply-To: <c96b480b-d44c-eb63-c8ff-572610ab3372@Alexander.Shukaev.name> (Alexander Shukaev's message of "Tue, 13 Dec 2016 01:52:31 +0100")

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





      parent reply	other threads:[~2019-10-09  7:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-13  0:52 bug#25190: Initialization of `dired-mode-map' in by the `dired-x' feature is not safe Alexander Shukaev
2016-12-13  2:18 ` Glenn Morris
2016-12-13  3:04   ` Drew Adams
2019-10-09  7:41 ` 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=871rvmqsc1.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=25190@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).