diff options
| -rw-r--r-- | doc/lispref/modes.texi | 7 | ||||
| -rw-r--r-- | etc/NEWS | 9 | ||||
| -rw-r--r-- | 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 7b64a56b199..4315b70ed72 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'." | |||
| 1292 | @end group | 1292 | @end group |
| 1293 | @group | 1293 | @group |
| 1294 | (setq-local text-mode-variant t) | 1294 | (setq-local text-mode-variant t) |
| 1295 | (setq-local require-final-newline mode-require-final-newline) | 1295 | (setq-local require-final-newline mode-require-final-newline)) |
| 1296 | (setq-local indent-line-function #'indent-relative)) | ||
| 1297 | @end group | 1296 | @end group |
| 1298 | @end smallexample | 1297 | @end smallexample |
| 1299 | 1298 | ||
| 1300 | @noindent | ||
| 1301 | (The last line is redundant nowadays, since @code{indent-relative} is | ||
| 1302 | the default value, and we'll delete it in a future version.) | ||
| 1303 | |||
| 1304 | @cindex @file{lisp-mode.el} | 1299 | @cindex @file{lisp-mode.el} |
| 1305 | The three Lisp modes (Lisp mode, Emacs Lisp mode, and Lisp Interaction | 1300 | The three Lisp modes (Lisp mode, Emacs Lisp mode, and Lisp Interaction |
| 1306 | mode) have more features than Text mode and the code is correspondingly | 1301 | mode) have more features than Text mode and the code is correspondingly |
| @@ -1371,6 +1371,15 @@ ending character were silently omitted. | |||
| 1371 | For example, '(rx (any "@z-a" (?9 . ?0)))' would match '@' only. | 1371 | For example, '(rx (any "@z-a" (?9 . ?0)))' would match '@' only. |
| 1372 | Now, such rx expressions generate an error. | 1372 | Now, such rx expressions generate an error. |
| 1373 | 1373 | ||
| 1374 | +++ | ||
| 1375 | ** 'text-mode' no longer sets the value of 'indent-line-function'. | ||
| 1376 | The global value of 'indent-line-function', which defaults to | ||
| 1377 | 'indent-relative', will no longer be reset locally when turning on | ||
| 1378 | 'text-mode'. | ||
| 1379 | |||
| 1380 | To get back the old behavior, add a function to 'text-mode-hook' which | ||
| 1381 | performs (setq-local indent-line-function #'indent-relative). | ||
| 1382 | |||
| 1374 | 1383 | ||
| 1375 | * Lisp Changes in Emacs 27.1 | 1384 | * Lisp Changes in Emacs 27.1 |
| 1376 | 1385 | ||
diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el index 90bb3eb3b53..61144902083 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 | |||
| 105 | \\{text-mode-map} | 105 | \\{text-mode-map} |
| 106 | Turning on Text mode runs the normal hook `text-mode-hook'." | 106 | Turning on Text mode runs the normal hook `text-mode-hook'." |
| 107 | (setq-local text-mode-variant t) | 107 | (setq-local text-mode-variant t) |
| 108 | (setq-local require-final-newline mode-require-final-newline) | 108 | (setq-local require-final-newline mode-require-final-newline)) |
| 109 | (setq-local indent-line-function #'indent-relative)) | ||
| 110 | 109 | ||
| 111 | (define-derived-mode paragraph-indent-text-mode text-mode "Parindent" | 110 | (define-derived-mode paragraph-indent-text-mode text-mode "Parindent" |
| 112 | "Major mode for editing text, with leading spaces starting a paragraph. | 111 | "Major mode for editing text, with leading spaces starting a paragraph. |