From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: How to run indent command in arbitrary buffer while respecting user settings? Date: Fri, 30 Jun 2023 07:01:47 +0200 Message-ID: <871qhtr14a.fsf@gnu.org> References: <87352avys3.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15255"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.11.7; emacs 30.0.50 Cc: emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 30 07:06:24 2023 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 1qF6Ku-0003mm-2n for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Jun 2023 07:06:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qF6K9-0004Cx-81; Fri, 30 Jun 2023 01:05:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qF6K5-0004Ce-C3 for emacs-devel@gnu.org; Fri, 30 Jun 2023 01:05:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qF6K4-0003SU-Um; Fri, 30 Jun 2023 01:05:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=CA1vMzPwlxkgf/VS5hwhvPgIWidFGlNfTfKDBQcvscA=; b=Yudw7j7QRo02aP glMgoJnZORBErybn7psxOm0/H7qQiQkBeYU+ooWxdbu21v9qoQpLkBjCdCNcWAWfTzzdQM5npeb5E cw9pr+Y79gkT1jQJuNypYE2DyDs3dAtOSx5eNNdf2nfeiKXSpwKDp3HUGER2D+HPjYI6g9wGencYF SBS7QMdqTIlz6D0bwW0/w1eai+rZLJPEn+L23Dd9Q5vv4zk8lLA1U2kHFd3j1Frs4FqoJokVlf8b7 WqJeLCXXJA2GbK37w4Ky+dk+Jf5mTzhx7DwIZOsK2hrHtQsg0Xu0xTNpTy5UVQAe/+DXfR3qzQpV9 qXBDqN7xOE/awLS38K0g==; Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qF6K4-00064R-Ib; Fri, 30 Jun 2023 01:05:32 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id CADDF27C005A; Fri, 30 Jun 2023 01:05:29 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 30 Jun 2023 01:05:29 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrtdehgdelgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfhgfhffvvefuffgjkfggtgesthdtre dttdertdenucfhrhhomhepvfgrshhsihhlohcujfhorhhnuceothhsughhsehgnhhurdho rhhgqeenucggtffrrghtthgvrhhnpedujedtheduvdelffejkeetgedvheelhedvueefhf eukeekkeehvdfggeegffevgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehthhhorhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhith ihqdekieejfeekjeekgedqieefhedvleekqdhtshguhheppehgnhhurdhorhhgsehfrghs thhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 30 Jun 2023 01:05:28 -0400 (EDT) In-reply-to: <87352avys3.fsf@localhost> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:307306 Archived-At: Ihor Radchenko writes: > Is there any reliable way to perform indentation in an arbitrary major > mode programmatically? Does `indent-region' do the right thing? That honors `indent-region-function' if set (which it is also in cc-modes) or use `indent-according-to-mode' (which uses `indent-line-function')? Bye, Tassilo