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

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

Re: Key-binding without minor mode!


From: Phillip Lord
Subject: Re: Key-binding without minor mode!
Date: Mon, 15 Sep 2014 13:48:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> I am confused then. Should the major mode be binding to \t always then,
>> and never [tab]? In which case, what is the point of being able to bind
>> to [tab]?
>
> The major mode should only bind to [tab] if it wants to behave
> differently under a GUI than under a tty (which seems highly unlikely),
> or if it does not care to work under a tty and wants to distinguish the
> TAB key from the C-i key.



org does I think -- it binds tab, and C-i but not "\t".

(org-defkey org-mode-map "\C-i"       'org-cycle)
(org-defkey org-mode-map [(tab)]      'org-cycle)

Phil



reply via email to

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