[Top][All Lists]

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

RE: Different key maps in different dired buffers

From: Drew Adams
Subject: RE: Different key maps in different dired buffers
Date: Thu, 26 May 2016 07:03:16 -0700 (PDT)

> The function local-set-key seems to be local to major mode, not
> local to an individual buffer.  Can anyone tell me how to set keys to
> special functions in only some dired buffers?

In addition to what others have said, which answers your question,
I'd ask what you really want to do.

In particular, are you trying to do something different for a given
class (subset, kind) of Dired buffers, or just arbitrary different
Dired buffers.  If the former, then consider defining a submode,
i.e., a mode that inherits from Dired mode but has its own keymap
and possibly does things a bit differently.  You can do this with
a major mode or a minor mode.

But if there is no way to recognize a Dired buffer that you might
want to have different key bindings for, then this approach would
not apply.  In that case, the Dired buffers you want to do this
in/for are, in effect, arbitrary.

reply via email to

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