aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory Heytings2022-07-29 08:11:10 +0000
committerGregory Heytings2022-07-29 10:15:06 +0200
commitcdaa3b51f1500ca1d91452037efe68fa0f7808bc (patch)
tree305a98ddcf9a72ab00f2eae459abdc222ff66358
parentc6029ed34ea83c7c0adbd723d63bd78ff0ec0796 (diff)
downloademacs-feature/long-lines-and-font-locking.tar.gz
emacs-feature/long-lines-and-font-locking.zip
Further minor improvements of documentationfeature/long-lines-and-font-locking
* src/xdisp.c (syms_of_xdisp) <fontification-functions>: * etc/NEWS: Further minor wording improvements.
-rw-r--r--etc/NEWS19
-rw-r--r--src/xdisp.c8
2 files changed, 14 insertions, 13 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 2259c0e766f..2d1ca8e98dd 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -334,18 +334,19 @@ Use something like 'M-x shell RET ssh <host> RET' instead.
334* Changes in Emacs 29.1 334* Changes in Emacs 29.1
335 335
336--- 336---
337** Emacs is now capable of editing files with very long lines. 337** Emacs is now capable of editing files with arbitrarily long lines.
338The display of long lines has been optimized, and Emacs should no 338The display of long lines has been optimized, and Emacs no longer
339longer choke when a buffer on display contains long lines. The 339chokes when a buffer on display contains long lines. The variable
340variable 'long-line-threshold' controls whether and when these display 340'long-line-threshold' controls whether and when these display
341optimizations are in effect. 341optimizations are in effect.
342 342
343If you still experience slowdowns while editing files with long lines, 343If you still experience slowdowns while editing files with long lines,
344this is due either to the current major mode or to one of the enabled 344this is due to line truncation, or to one of the enabled minor modes,
345minor modes. Try disabling the minor modes, or turn on 'so-long-mode' 345or to the current major mode. Try turning off line truncation with
346or 'so-long-minor-mode', or visit the file with find-file-literally' 346'C-x x t', or try disabling all known slow minor modes with 'M-x
347instead of the usual 'C-x C-f'. Another reason for slowdown could be 347so-long-minor-mode', or try disabling all known slow minor modes and
348line truncation, which you can turn off with 'C-x x t'. 348the major mode with 'M-x so-long-mode', or visit the file with 'M-x
349find-file-literally' instead of the usual 'C-x C-f'.
349 350
350Note that the display optimizations in these cases may cause the 351Note that the display optimizations in these cases may cause the
351buffer to be occasionally mis-fontified. 352buffer to be occasionally mis-fontified.
diff --git a/src/xdisp.c b/src/xdisp.c
index 3ef3c0d3796..e13d68eab9d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -36656,10 +36656,10 @@ fontify a region starting at POS in the current buffer, and give
36656fontified regions the property `fontified' with a non-nil value. 36656fontified regions the property `fontified' with a non-nil value.
36657 36657
36658Note that, when the buffer contains one or more lines whose length is 36658Note that, when the buffer contains one or more lines whose length is
36659above `long-line-threshold', the narrowing of the buffer is locked 36659above `long-line-threshold', these functions only have access to a
36660(see `narrow-to-region'), and these functions only have access to a 36660small portion of the buffer around POS, and cannot use `widen' to gain
36661small portion of the buffer around POS and cannot use `widen' to gain 36661access to other portions of buffer text because the narrowing of the
36662access to other portions of buffer text. */); 36662buffer is locked (see `narrow-to-region'). */);
36663 Vfontification_functions = Qnil; 36663 Vfontification_functions = Qnil;
36664 Fmake_variable_buffer_local (Qfontification_functions); 36664 Fmake_variable_buffer_local (Qfontification_functions);
36665 36665