From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: [emacs] tabs, spaces, and indentation Date: Thu, 07 Oct 2010 11:30:43 +0200 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291887312 14513 80.91.229.12 (9 Dec 2010 09:35:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 09:35:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 10:35:08 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQcu4-0007D2-8S for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 10:35:08 +0100 Original-Received: from localhost ([127.0.0.1]:44030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQcu3-00015Z-3h for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 04:35:07 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!feeder.erje.net!newsfeed.datemas.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Injection-Date: Thu, 7 Oct 2010 09:30:43 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="DR4cGyj5B918u95ykQTx7Q"; logging-data="30410"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18DP57aCQc7eKzRDqQ05D+U" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:AZ+RrIkWGj4nQiFxBwvDD3r+EOE= sha1:4xlpYnENoVGuDU3k9WXrwuObVmg= Original-Xref: usenet.stanford.edu gnu.emacs.help:181669 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:76924 Archived-At: > ;;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