all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: [emacs] tabs, spaces, and indentation
Date: Thu, 07 Oct 2010 11:30:43 +0200	[thread overview]
Message-ID: <jwv62xenyli.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: mailman.5.1286432793.11901.help-gnu-emacs@gnu.org

> ;;force TAB to insert just one TAB:
>     (global-set-key (kbd "TAB") 'self-insert-command)
> (This would be for every mode - but it may be best to just set it for
> your C mode)

Note also that it may fail to work for some major modes, in which case
it's normally a bug in that major mode.

For the problem of having auto-indentation take place while inserting
some other character, this is usually considered a feature, named
"electric keys" or something like that.  Until now this has been
implemented in ad-hoc ways, separately in each major mode, so the way to
turn it off is different for each and every major mode.

Emacs-24 will introduce a standard way to provide this feature, with
a corresponding standard way (called electric-indent-mode) to turn it on
or off globally (tho it will only work with those major modes which use
this new standard implementation rather than doing it their own way).


        Stefan


  parent reply	other threads:[~2010-10-07  9:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-06 20:06 [emacs] tabs, spaces, and indentation Nerius Landys
2010-10-07  4:22 ` PJ Weisberg
2010-10-08 21:44   ` PJ Weisberg
2010-10-08 22:12     ` Nerius Landys
2010-10-07  6:26 ` Jonathan Groll
     [not found] ` <mailman.5.1286432793.11901.help-gnu-emacs@gnu.org>
2010-10-07  9:30   ` Stefan Monnier [this message]
2010-10-09  2:08 ` Steve Revilak
2010-10-11 20:19   ` Nerius Landys
2010-10-11 21:43     ` PJ Weisberg
2010-10-11 22:14       ` Nerius Landys
2010-10-12  1:42     ` Steve Revilak
     [not found]   ` <mailman.3.1286828409.23066.help-gnu-emacs@gnu.org>
2010-10-11 21:58     ` Pascal J. Bourguignon
     [not found] <mailman.5.1286400966.24129.help-gnu-emacs@gnu.org>
2010-10-06 22:05 ` despen

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=jwv62xenyli.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --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.