From: Eli Zaretskii Date: Sat, 14 May 2022 14:48:22 +0000 (+0300) Subject: ; * lisp/electric.el (electric-indent-mode): Clarify doc (bug#22564). X-Git-Tag: emacs-28.1.90~88 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8370caa835372ba7841e3822b0f929398c074e1a;p=emacs.git ; * lisp/electric.el (electric-indent-mode): Clarify doc (bug#22564). --- diff --git a/lisp/electric.el b/lisp/electric.el index 042fc90ccbe..4a35c1a2a14 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -310,10 +310,16 @@ column specified by the function `current-left-margin'." ;;;###autoload (define-minor-mode electric-indent-mode - "Toggle on-the-fly reindentation (Electric Indent mode). + "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 a character from `electric-indent-chars'. +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 accordiung to context and rules of the major mode. This is a global minor mode. To toggle the mode in a single buffer, use `electric-indent-local-mode'."