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.bugs Subject: bug#48058: tab-width's docstring Date: Tue, 27 Apr 2021 18:02:05 +0300 Message-ID: <8335vbixea.fsf@gnu.org> References: <87a6pj50u6.fsf@gmail.com> <83eeevj0kt.fsf@gnu.org> <87wnsnkcz1.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10602"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48058@debbugs.gnu.org To: Gustavo Barros Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 27 17:08:31 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1lbPKA-0002XM-R0 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Apr 2021 17:08:30 +0200 Original-Received: from localhost ([::1]:48078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbPK9-0002so-U5 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Apr 2021 11:08:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbPEs-0005o6-5b for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2021 11:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38973) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbPEr-0007Gc-Tn for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2021 11:03:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lbPEr-00051A-QX for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2021 11:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Apr 2021 15:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48058 X-GNU-PR-Package: emacs Original-Received: via spool by 48058-submit@debbugs.gnu.org id=B48058.161953575218963 (code B ref 48058); Tue, 27 Apr 2021 15:03:01 +0000 Original-Received: (at 48058) by debbugs.gnu.org; 27 Apr 2021 15:02:32 +0000 Original-Received: from localhost ([127.0.0.1]:50519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbPEO-0004va-17 for submit@debbugs.gnu.org; Tue, 27 Apr 2021 11:02:32 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbPEL-0004qK-TT for 48058@debbugs.gnu.org; Tue, 27 Apr 2021 11:02:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51926) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbPEG-0006qh-LN; Tue, 27 Apr 2021 11:02:24 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3938 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lbPEC-0006CT-FC; Tue, 27 Apr 2021 11:02:21 -0400 In-Reply-To: <87wnsnkcz1.fsf@gmail.com> (message from Gustavo Barros on Tue, 27 Apr 2021 11:40:18 -0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:205022 Archived-At: > From: Gustavo Barros > Cc: 48058@debbugs.gnu.org > Date: Tue, 27 Apr 2021 11:40:18 -0300 > > Let's say `emacs-lisp-mode', and let's say I've `indent-tabs-mode' set > to nil. Calling `tab-to-tab-stop' will actually insert 8 spaces in my > buffer, as per the default `tab-width'. If `tab-always-indent' is nil, > this also extends to `indent-for-tab-command'. There is no "TAB > character" involved, and also no issue about what is its "display > width". As far as I understand it, what `tab-width' is determining is > precisely the "indentation step". Or am I getting this wrong? This is major mode dependent. Try the same in C mode, for example, and you will see the difference. The function that indents the line is specific to the major mode. If you want to understand why you see what you see in emacs-lisp-mode, look at lisp-indent-line. But even in emacs-lisp-mode, what did you expect to happen instead? (indent-tabs-mode, btw, just uses spaces instead of TABs, but it still inserts the amount of spaces equivalent to a TAB where otherwise a TAB would have been inserted.)