From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Robert Thorpe" Newsgroups: gmane.emacs.help Subject: Re: tab-always-indent doesn't work Date: 12 Dec 2006 05:50:15 -0800 Organization: http://groups.google.com Message-ID: <1165931411.995106.201550@n67g2000cwd.googlegroups.com> References: NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: sea.gmane.org 1165934446 19058 80.91.229.10 (12 Dec 2006 14:40:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Dec 2006 14:40:46 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 12 15:40:46 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1Gu8o8-0002t2-GU for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Dec 2006 15:40:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gu8o7-0006hx-TJ for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Dec 2006 09:40:35 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!n67g2000cwd.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: 163.244.62.65 Original-X-Trace: posting.google.com 1165931421 29956 127.0.0.1 (12 Dec 2006 13:50:21 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 12 Dec 2006 13:50:21 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.0 EMF1ASPROXY03 Complaints-To: groups-abuse@google.com Injection-Info: n67g2000cwd.googlegroups.com; posting-host=163.244.62.65; posting-account=hWoAPxMAAAAnBKSBz1ZivwUPPjEuve7bvVCHZQ8rhrluPfwcBJd92w Original-Xref: shelby.stanford.edu gnu.emacs.help:143859 Original-To: help-gnu-emacs@gnu.org 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:39462 Archived-At: Ronald wrote: > I can't add comment in c files as below (comment can't be aligned using tab) > > for(;;){ > int i; //a > int iii; //b > } What tab-always-indent's documentation says is:- *Controls the operation of the TAB key. If t, hitting TAB always just indents the current line. If nil, hitting TAB indents the current line if point is at the left margin or in the line's indentation, otherwise it insert a `real' tab character. So if you set it to t then hitting tab will indent the current line. So, pressing tab at then end of "int i;" will not do anything if the current line is already indented. If it is set to nil then only when the cursor is in the left margin will tab "indent", otherwise it will deliver a real tab. HOWEVER... Program modes do not use tab-always-indent, they have their own variables... c-tab-always-indent perl-tab-always-indent fortran-tab-mode-default Some even, like lisp-mode, have no equivalent variable. You must set these variables separately. (I think that tab-always-indent's documentation is unclear and needs fixing)