[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How bind C-c C-c to specific buffer?
From: |
Oleksandr Gavenko |
Subject: |
Re: How bind C-c C-c to specific buffer? |
Date: |
Sat, 12 Nov 2011 14:07:14 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (windows-nt) |
On 2011-11-12, XeCycle wrote:
> Oleksandr Gavenko <gavenkoa@gmail.com> writes:
>
>> I try implement functionality that spawn buffer, user type message and after
>> C-c C-c must arise my function that get typed text and kill buffer (like in
>> remember or message or log buffers).
>>
>> How can I archive my goal?
>>
>> Is it possible to bind key sequence limited to specific buffer without
>> implementing major mode?
>
> See local-set-key.
>From docs:
local-set-key is an interactive compiled Lisp function in `subr.el'.
(local-set-key KEY COMMAND)
[...]
The binding goes in the current buffer's local map, which in most cases is
shared with all other buffers in the same major mode.
So my assumption that I need implement fake major mode to get key binding true
temporary (does not reflected to any other modes/bindings)?
Or I can define my own map and set it with 'use-local-map' for buffer?
--
Best regards!