From: Blake McBride <blake@mcbride.name>
To: help-gnu-emacs@gnu.org
Subject: Re: TAB key to insert tab character
Date: Mon, 11 Feb 2008 08:27:04 -0600 [thread overview]
Message-ID: <13r0mpcfs5ggu7c@news.supernews.com> (raw)
In-Reply-To: <mailman.7240.1202616871.18990.help-gnu-emacs@gnu.org>
Eli Zaretskii wrote:
>> From: Blake McBride <blake@mcbride.name>
>> Date: Sat, 09 Feb 2008 14:56:02 -0600
>>
>>> You could do what I do - bind Ctrl-Tab to insert an ASCII <tab>:
>>>
>>> (global-set-key [C-tab] (lambda () (interactive) (insert-char 9 1)))
>>>
>>> - Will
>> I don't want to globally set anything. I like the way the TAB key works
>> in C and Lisp modes. I just want to change its behavior in TEXT and
>> FUNDAMENTAL modes.
>
> Did you actually try that? I think mode-specific key bindings always
> override global bindings, so the above will not affect C mode. for
> example.
>
> But if you want to bind TAB in Text mode, then try the below:
>
> (define-key text-mode-map "\C-i" 'self-insert-command)
>
> You will need to do this in a text-mode-hook.
>
>
Okay, I added the following line:
(define-key text-mode-map (kbd "TAB") 'self-insert-command)
This fixed the problem in TEXT mode. I didn't seem to have to use it in
a text-mode-hook. Now the problem is how to fix thins in FUNDAMENTAL
mode (the mode used when no special file extension is used)?
Thanks.
Blake McBride
next prev parent reply other threads:[~2008-02-11 14:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-08 23:36 TAB key to insert tab character Blake McBride
2008-02-09 4:34 ` Drew Adams
[not found] ` <mailman.7193.1202531707.18990.help-gnu-emacs@gnu.org>
2008-02-09 5:16 ` Blake McBride
2008-02-09 13:13 ` Steve Taylor
2008-02-09 10:03 ` Peter Dyballa
[not found] ` <mailman.7204.1202551399.18990.help-gnu-emacs@gnu.org>
2008-02-09 17:54 ` Blake McBride
2008-02-09 17:58 ` Will Parsons
2008-02-09 19:46 ` Eli Zaretskii
2008-02-09 20:56 ` Blake McBride
2008-02-10 4:14 ` Eli Zaretskii
[not found] ` <mailman.7240.1202616871.18990.help-gnu-emacs@gnu.org>
2008-02-11 14:27 ` Blake McBride [this message]
2008-02-12 19:38 ` Eli Zaretskii
[not found] ` <mailman.7229.1202586422.18990.help-gnu-emacs@gnu.org>
2008-02-10 1:18 ` Will Parsons
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=13r0mpcfs5ggu7c@news.supernews.com \
--to=blake@mcbride.name \
--cc=help-gnu-emacs@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.