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.help Subject: Re: [External] : Tab completion and electric-indent-mode Date: Sat, 18 Jun 2022 11:17:05 +0300 Message-ID: <83h74io072.fsf@gnu.org> References: <83zgibnw34.fsf@gnu.org> <83pmj6o4gk.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4457"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 18 10:19:03 2022 Return-path: Envelope-to: geh-help-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 1o2Tfa-0000vG-2k for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 18 Jun 2022 10:19:02 +0200 Original-Received: from localhost ([::1]:59896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2TfY-0001zB-M6 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 18 Jun 2022 04:19:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2Tdn-0001yx-NY for help-gnu-emacs@gnu.org; Sat, 18 Jun 2022 04:17:12 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60254) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2Tdm-0000B0-SY for help-gnu-emacs@gnu.org; Sat, 18 Jun 2022 04:17:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5SgKtHekFXeHykyFBI6SHe7SCZr3DsgKG9VjP15LE/c=; b=gHEc9FGA3iZ3 8aw8hxK800m3POaaqMawOqp/BPMuGKnm2RJW3BHcZ1j5ftkVKHdV9AoS3QpGcd7k+W7Qnx3JwgkQQ hmnKXuIiMoekkp4v2u/eQSNvN00C/XNQMhJNy7Emo1HdJRPHhrdrLufAxeJdZ0TxNM5/e9NhtlSHL Vg+M0TJU4B8jS4ixEYubYtb+JauULXNkC7UMOGwfv8af7nMLa1yJjxCL3hfQLYjoXVm+dn1xlFvde iCbnQfwReo84szaXwXYigQe1hBw0pSoT23Idpt+kqvi+Z94bdQ5m6OGGQmFnHsgSW8epdIBm8jIVp d2JOwfPJpPZWUxgIWIXWSQ==; Original-Received: from [87.69.77.57] (port=3319 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2Tdm-0004op-0c for help-gnu-emacs@gnu.org; Sat, 18 Jun 2022 04:17:10 -0400 In-Reply-To: (carlmarcos@tutanota.com) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:137914 Archived-At: > Date: Sat, 18 Jun 2022 10:05:54 +0200 (CEST) > From: carlmarcos@tutanota.com > Cc: help-gnu-emacs@gnu.org > > What exactly indentation and reindentation do depends on the current > major mode. electric-indent-mode just makes the mode-specific > indentation to happen automatically in certain situations, where Emacs > thinks the user expects reindentation. > > If you want to know how a specific major mode indents text, you need > to look for answers in that mode, not in electric-indent-mode, because > the latter simply cannot give you the answer. > > How can a user get that information, are there commands for that? The commands for that are the usual Help commands, but you need to apply them to the major mode you are interested in. > Toggle on-the-fly reindentation of text lines (Electric Indent mode). > > When enabled, this reindents whenever the hook `electric-indent-functions' > returns non-nil, or if you insert one of the "electric characters". > The electric characters normally include the newline, but can > also include other characters as needed by the major mode; see > `electric-indent-chars' for the actual list. > > By "reindent" we mean remove any existing indentation, and then > indent the line according to context and rules of the major mode. > > Can there be a clarification that reindentation removes the existing indentation > with new indentation rules applied? ??? Isn't the above saying precisely that? Or maybe I don't understand what you need clarified?