From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@gmx.net (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Re: Procedure for changing the FAQ Date: Sat, 26 Apr 2003 23:24:24 +0200 Organization: University of Duisburg, Germany Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <84u1clne9j.fsf@lucy.is.informatik.uni-duisburg.de> References: <7680-Wed23Apr2003121503+0300-eliz@elta.co.il> <877k9kn8w5.fsf@gnu.org> <84adegjq2i.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1051392426 12282 80.91.224.249 (26 Apr 2003 21:27:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 26 Apr 2003 21:27:06 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Apr 26 23:27:04 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 199XCK-0003Bm-00 for ; Sat, 26 Apr 2003 23:27:04 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 199XJh-00047T-00 for ; Sat, 26 Apr 2003 23:34:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 199XD3-00068t-04 for emacs-devel@quimby.gnus.org; Sat, 26 Apr 2003 17:27:49 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 199XCo-00062X-00 for emacs-devel@gnu.org; Sat, 26 Apr 2003 17:27:34 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 199XCM-0004zh-00 for emacs-devel@gnu.org; Sat, 26 Apr 2003 17:27:15 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 199XC9-0004KN-00 for emacs-devel@gnu.org; Sat, 26 Apr 2003 17:26:53 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 199XB6-00037Q-00 for ; Sat, 26 Apr 2003 23:25:48 +0200 Mail-Followup-To: emacs-devel@gnu.org X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 199XB5-00037H-00 for ; Sat, 26 Apr 2003 23:25:47 +0200 Original-Lines: 103 Original-X-Complaints-To: usenet@main.gmane.org Mail-Copies-To: never User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:xZ3uuNCRUWo9dvk9vAKzBcvEetc= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13485 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13485 Richard Stallman writes: > Ok to fix? > > Please do give it a try. Here is my first attempt. The wording is awful, but I hope it shows the general direction that I meant. Writing documentation is quite hard! If the direction is okay, I'll sleep over it and try to come up with something more coherent. Should there be a special `overview' section? Should the overview come before or after the list of keys? (Note that TAB in fundamental mode and text mode now runs indent-relative, the following patch reflects that. Not sure if the remark about TAB in indented text mode in the following node needs to be changed.) (Regarding the list of keys the node Indentation, I think that `do like TAB on each line' is a better description of indent-region. Most of the time, it does NOT indent all of the lines to the same column ;-) --- indent.texi.~1.11.~ Wed Feb 5 20:46:31 2003 +++ indent.texi Sat Apr 26 23:10:18 2003 @@ -35,10 +35,56 @@ Indent from point to under an indentation point in the previous line. @end table + Emacs supports four general categories of operations that could all +be called `indentation': + +@enumerate +@item +The most simple operation is to just insert a tab character. This +operation does not have a convenient key binding, because it is +subsumed by the more general operation described next. But you can use +@kbd{C-q @key{TAB}} to insert a literal tab character. + +A tab character is displayed as a stretch of whitespace which extends +to the next display tab stop position, and the default width of a tab +stop is eight. @xref{Display Custom}, for more details. + +@item +Emacs also supports tab stops. You can set them at arbitrary +positions, and then use @kbd{M-i} to advance to the next tab stop. The +default tab stop list contains positions (columns) that are a multiple +of eight, and so the effect of @kbd{M-i} is the same as that of +@kbd{C-q @key{TAB}} in the default case. + +You can set the tab stops with @kbd{M-x edit-tab-stops}. + +@item +You can align successive lines with each other. This is called +@dfn{relative indentation} in Emacs and is performed by the command +@kbd{M-x indent-relative}. The effect is best shown by an example: +@example +This shows the effect of relative indentation. +^ ^ ^ ^ ^ ^ ^ +@end example +The positions for the @code{^} characters on the second line were +obtained using @kbd{M-x indent-relative}. + +In Fundamental mode and in Text mode, @key{TAB} runs the command +@code{indent-relative}. + +@item +The most sophisticated method is called @dfn{syntax-driven indentation} +and is the default behavior of the @key{TAB} key in Emacs. + Most programming languages have some indentation convention. For Lisp code, lines are indented according to their nesting in parentheses. The same general idea is used for C code, though many details are different. + For some languages, different kinds of indentation styles are +commonly used. Emacs accomodates this by allowing users to customize +the indentation. For example, see @ref{Customizing Indentation,,,ccmode}, +for a description of these facilities for the C language. + @kindex TAB Whatever the language, to indent a line, use the @key{TAB} command. Each major mode defines this command to perform the sort of indentation @@ -48,9 +94,11 @@ mode, @key{TAB} implements a subtle and sophisticated indentation style that knows about many aspects of C syntax. - In Text mode, @key{TAB} runs the command @code{tab-to-tab-stop}, which -indents to the next tab stop column. You can set the tab stops with -@kbd{M-x edit-tab-stops}. +@end enumerate + +@c In Text mode, @key{TAB} runs the command @code{tab-to-tab-stop}, which +@c indents to the next tab stop column. You can set the tab stops with +@c @kbd{M-x edit-tab-stops}. Normally, @key{TAB} inserts an optimal mix of tabs and spaces for the intended indentation. @xref{Just Spaces}, for how to prevent use -- file-error; Data: (Opening input file no such file or directory ~/.signature)