[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs] tabs, spaces, and indentation
From: |
PJ Weisberg |
Subject: |
Re: [emacs] tabs, spaces, and indentation |
Date: |
Wed, 6 Oct 2010 21:22:34 -0700 |
On Wed, Oct 6, 2010 at 1:06 PM, Nerius Landys <nlandys@gmail.com> wrote:
> The behavior for this particular mode of operation that would be nice is as
> follows:
>
> 1. Hitting the Tab key places a literal Tab character in my file. That is
> all.
> 2. I notice that sometimes when I complete a like (e.g. adding a semicolon
> or adding a paren) it auto-indents for me. I want to turn this off
> completely.
Setting indent-line-function and indent-region-function doesn't seem
to do a damn thing, but (local-set-key "\t" 'self-insert-command)
works for #1 when it's called after you've switched to the major mode
you're using.
Also, if you configure tab-always-indent to nil Tab will only indent
if the cursor is at the start of the line. You can always insert a
literal tab with C-q Tab.
Dunno what to do about #2. The help docs lead me to believe setting
indent-line-function and indent-region-function is the answer, but
like I said those don't seem to do anything.
- [emacs] tabs, spaces, and indentation, Nerius Landys, 2010/10/06
- Re: [emacs] tabs, spaces, and indentation,
PJ Weisberg <=
- Re: [emacs] tabs, spaces, and indentation, Jonathan Groll, 2010/10/07
- Re: [emacs] tabs, spaces, and indentation, Steve Revilak, 2010/10/08