[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 2e3deb0 2/3: Do not set indent-line-function in tex
From: |
Basil L. Contovounesios |
Subject: |
[Emacs-diffs] master 2e3deb0 2/3: Do not set indent-line-function in text-mode |
Date: |
Sun, 31 Mar 2019 17:42:16 -0400 (EDT) |
branch: master
commit 2e3deb09bd42d22a9b354937ce63b151fb493d8a
Author: Basil L. Contovounesios <address@hidden>
Commit: Basil L. Contovounesios <address@hidden>
Do not set indent-line-function in text-mode
For discussion, see thread starting at:
https://lists.gnu.org/archive/html/emacs-devel/2019-03/msg01012.html
* lisp/textmodes/text-mode.el (text-mode): Do not reset
indent-line-function to its global default value of indent-relative.
* doc/lispref/modes.texi (Example Major Modes):
* etc/NEWS: Document change accordingly.
---
doc/lispref/modes.texi | 7 +------
etc/NEWS | 9 +++++++++
lisp/textmodes/text-mode.el | 3 +--
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 7b64a56..4315b70 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -1292,15 +1292,10 @@ Turning on Text mode runs the normal hook
`text-mode-hook'."
@end group
@group
(setq-local text-mode-variant t)
- (setq-local require-final-newline mode-require-final-newline)
- (setq-local indent-line-function #'indent-relative))
+ (setq-local require-final-newline mode-require-final-newline))
@end group
@end smallexample
address@hidden
-(The last line is redundant nowadays, since @code{indent-relative} is
-the default value, and we'll delete it in a future version.)
-
@cindex @file{lisp-mode.el}
The three Lisp modes (Lisp mode, Emacs Lisp mode, and Lisp Interaction
mode) have more features than Text mode and the code is correspondingly
diff --git a/etc/NEWS b/etc/NEWS
index 7486d6b..89e07a2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1371,6 +1371,15 @@ ending character were silently omitted.
For example, '(rx (any "@z-a" (?9 . ?0)))' would match '@' only.
Now, such rx expressions generate an error.
++++
+** 'text-mode' no longer sets the value of 'indent-line-function'.
+The global value of 'indent-line-function', which defaults to
+'indent-relative', will no longer be reset locally when turning on
+'text-mode'.
+
+To get back the old behavior, add a function to 'text-mode-hook' which
+performs (setq-local indent-line-function #'indent-relative).
+
* Lisp Changes in Emacs 27.1
diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el
index 90bb3eb..6114490 100644
--- a/lisp/textmodes/text-mode.el
+++ b/lisp/textmodes/text-mode.el
@@ -105,8 +105,7 @@ You can thus get the full benefit of adaptive filling
\\{text-mode-map}
Turning on Text mode runs the normal hook `text-mode-hook'."
(setq-local text-mode-variant t)
- (setq-local require-final-newline mode-require-final-newline)
- (setq-local indent-line-function #'indent-relative))
+ (setq-local require-final-newline mode-require-final-newline))
(define-derived-mode paragraph-indent-text-mode text-mode "Parindent"
"Major mode for editing text, with leading spaces starting a paragraph.