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

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

Re: How to bind a key locally to a buffer (not mode!)


From: John Mastro
Subject: Re: How to bind a key locally to a buffer (not mode!)
Date: Sun, 19 Oct 2014 14:12:26 -0700

> Marcin Borkowski <mbork@wmi.amu.edu.pl> wrote:
> I'd like to bind a key in /one buffer/ only, so that the rebinding does
> not affect other buffers in this mode.  I could probably do it by
> defining a minor mode, which rebinds this key to a function, which runs
> a function set by a buffer-local variable, but this seems rather
> convoluted.  Is there a simpler way to achieve this?

Why not define a minor mode but, instead of the buffer-local
variable thing, only activate this mode in the buffer where you
want the binding?

-- 
john



reply via email to

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