From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.help Subject: Re: Turning electric-indent-mode off, for a specific buffer Date: Mon, 13 Jun 2022 20:15:03 +0800 Message-ID: <87r13sbvzs.fsf@yahoo.com> References: <87bkuxe7dt.fsf@yahoo.com> <8735g9e1v0.fsf@yahoo.com> <87v8t5ce6v.fsf@yahoo.com> <4DUz-kf-CK2qVDH5pFZDC7c-vBuAu4wvT0bFwIEfcukj9m9mqKhHFx2kEizjKCveMd2afYBVOfqfu1UYrGtr7GYs7YdwuchsvtKWrh4sLuA=@protonmail.com> <874k0odc76.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12327"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: goncholden via Users list for the GNU Emacs text editor To: goncholden Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 13 14:39:10 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 1o0jLZ-00031t-R6 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Jun 2022 14:39:09 +0200 Original-Received: from localhost ([::1]:40946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0jLX-0003NO-Gx for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Jun 2022 08:39:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0iyU-0002i2-QA for help-gnu-emacs@gnu.org; Mon, 13 Jun 2022 08:15:20 -0400 Original-Received: from sonic316-20.consmr.mail.ne1.yahoo.com ([66.163.187.146]:41630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0iyS-0008FP-VX for help-gnu-emacs@gnu.org; Mon, 13 Jun 2022 08:15:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1655122514; bh=12TdUINX8X5XbBpI0OCVVsCzFTbl2HwdBEjBNcMM4wM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=Jn5aCs5mH+uXxlrRkZ3VXC0OA/7yhOShwkdTMeEyKy3EtPcc9HSz4bWj4pf1e2I+61KuzN7gR2yuYhOHgxDlgBMfRlXF88dyV6Jh1o9Far15GxLx17TVyZfkAdKir435dd0KJT02DZtHZ4EAJx06Hz0Q9HPXu72DiNxQZ5W9Imv24jfdMOCzUFp/00OLEyhs+RFQCVAbRlCOnikEhsyMaPQoefTgxrxLYek7eb3gb8QiJYtn9TvLxhP7xDIT9U2U82MhrY/piZJhwI4BcwJ5B4ZwAJujWZEwRD6KqkoXMgjIkstWf9l8MHd5f5HZv+sE0akLMrxc6mvDwz9YIUU55g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1655122514; bh=Ae734VF4DCAODhMheJx8WcYyeConLCEb+ZoTKbkDejn=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=paJvfH44wE9+Lhy6T4Oba5CdeFLPoX5Ddem+Er3qjgYExzNVGTks34+oiDrHwEh2Igqa4uzsCIeqDKhPv9EhYKI3gglZnlOpvVfOgReCh0l3TNYqFzJpxZMg2Cz5n4QJWjWuE2HCmJl9QazwKQFkAkH6xaG2ZBF+L5V1ox8ocTzFlf6BkYwHRYzHv2hrSf36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onic316.consmr.mail.ne1.yahoo.com with HTTP; Mon, 13 Jun 2022 12:15:14 +0000 Original-Received: by hermes--canary-production-sg3-5f7658c994-m7v88 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 195f9e32b58e7f57948a7af1d7b7af2a; Mon, 13 Jun 2022 12:15:07 +0000 (UTC) In-Reply-To: (goncholden@protonmail.com's message of "Mon, 13 Jun 2022 12:01:48 +0000") X-Mailer: WebService/1.1.20280 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.146; envelope-from=luangruo@yahoo.com; helo=sonic316-20.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:137790 Archived-At: goncholden writes: > Then customizing electric-indent-mode does not customize the variable > but the minor-mode? Yes. > If I remember correctly, when defining a minor-mode, a variable is > also created automatically. From your discussion, it seems that there > would also exist a function with the same name. Both a command that serves to switch a minor mode on or off and a variable is created when defining a minor mode. They share the same name, because Emacs Lisp, being a Lisp-2, has separate cells for functions and variables. All of this information is trivially available in the doc string of the function `electric-indent-mode', that of the macro `define-minor-mode', and the Emacs Lisp reference manual. I suggest you read them.