[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Turning electric-indent-mode off, for a specific buffer

From: Po Lu
Subject: Re: Turning electric-indent-mode off, for a specific buffer
Date: Mon, 13 Jun 2022 20:15:03 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux)

goncholden <> writes:

> Then customizing electric-indent-mode does not customize the variable
> but the minor-mode?


> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]