From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Indentation conventions for Info manuals; recognizing code Date: Mon, 08 Mar 2021 15:57:00 +0200 Message-ID: <83k0qhsq8j.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3318"; mail-complaints-to="usenet@ciao.gmane.io" Cc: drew.adams@oracle.com, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 08 15:19:37 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJGjQ-0000kk-FT for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Mar 2021 15:19:36 +0100 Original-Received: from localhost ([::1]:32960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJGjO-0006Om-Sq for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Mar 2021 09:19:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJGNr-0006ni-Ha for emacs-devel@gnu.org; Mon, 08 Mar 2021 08:57:19 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47620) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJGNq-0003pf-Ug; Mon, 08 Mar 2021 08:57:18 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1667 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lJGNi-0004B8-46; Mon, 08 Mar 2021 08:57:10 -0500 In-Reply-To: (message from Richard Stallman on Mon, 08 Mar 2021 00:37:21 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:266182 Archived-At: > From: Richard Stallman > Date: Mon, 08 Mar 2021 00:37:21 -0500 > Cc: emacs-devel@gnu.org > > > But other manuals don't seem to use the same indentation. Several > > (org, eintr, ccmode, efaq(-w32),...) indent code (including Elisp) > > 5 spaces - which is the same amount that other, non-code text is > > indented. > > Aside from eintr, I don't know anything specific about those manuals. > > The eintr manual was written by Bob Chassell; I presume it is still > generated from Texinfo, right? So I find it puzzling that it produces > a different format in the Info file. > > Why does it do that? Is the source formatted in an unusual way? Does > it somehow specify different parameters for generating the Info file? Neither eintr nor any other manual do anything special with @code. It's an illusion. The actual indentation of a code snippet in the Info output is determined not only by the immediate Texinfo source, but also by the surrounding context. The Introduction manual is written as a book, so @code blocks there are inserted in regular text, and the indentation of @code there is the original 5-space indentation. By contrast, most other manuals are written as reference manuals, and thus are full of @table's, @defun's, etc., and the @code blocks there are more often than not part of those environments. So the indentation of @code in those other manuals starts at the indentation of the innermost environment and not at the left margin. That's all.