[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/so-long c241aa2: fixup! Make `global-so-long-mode' use `buffer-l
From: |
Phil Sainty |
Subject: |
scratch/so-long c241aa2: fixup! Make `global-so-long-mode' use `buffer-line-statistics' |
Date: |
Sun, 1 Aug 2021 09:04:42 -0400 (EDT) |
branch: scratch/so-long
commit c241aa2d4465e4893fc446b75c50d17e6c0e1b99
Author: Phil Sainty <psainty@orcon.net.nz>
Commit: Phil Sainty <psainty@orcon.net.nz>
fixup! Make `global-so-long-mode' use `buffer-line-statistics'
---
etc/NEWS | 4 ++--
lisp/so-long.el | 14 ++++++++++++--
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index c9fb2d4..4f49d2a 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2830,8 +2830,8 @@ predicate (replacing 'so-long-detected-long-line-p').
---
*** 'so-long-threshold' and 'so-long-max-lines' have been raised to
-10000 bytes and 500 lines respectively, to reduce the likelihood
-of false-positives when 'global-so-long-mode' is enabled. The latter
+10000 bytes and 500 lines respectively, to reduce the likelihood of
+false-positives when 'global-so-long-mode' is enabled. The latter
value is now only used by the old predicate, as the new predicate
knows the longest line in the entire buffer.
diff --git a/lisp/so-long.el b/lisp/so-long.el
index b1a3de1..829afd6 100644
--- a/lisp/so-long.el
+++ b/lisp/so-long.el
@@ -535,6 +535,10 @@ the `so-long-predicate' function is
`so-long-statistics-excessive-p'."
(defcustom so-long-max-lines 500
"Number of non-blank, non-comment lines to test for excessive length.
+This option normally has no effect in Emacs versions >= 28.1, as the default
+`so-long-predicate' sees the entire buffer. Older versions of Emacs still make
+use of this option.
+
If nil then all lines will be tested, until either a long line is detected,
or the end of the buffer is reached.
@@ -549,6 +553,10 @@ See `so-long-detected-long-line-p' for details."
(defcustom so-long-skip-leading-comments t
"Non-nil to ignore all leading comments and whitespace.
+This option normally has no effect in Emacs versions >= 28.1, as the default
+`so-long-predicate' sees the entire buffer. Older versions of Emacs still make
+use of this option.
+
If the file begins with a shebang (#!), this option also causes that line to be
ignored even if it doesn't match the buffer's comment syntax, to ensure that
comments following the shebang will be ignored.
@@ -613,8 +621,10 @@ Only called if the major mode is a member of
`so-long-target-modes'.
The specified function will be called with no arguments. If it returns non-nil
then `so-long' will be invoked.
-Defaults to `so-long-statistics-excessive-p' starting from Emacs 28, or
-`so-long-detected-long-line-p' in earlier versions."
+Defaults to `so-long-statistics-excessive-p' starting from Emacs 28.1, or
+`so-long-detected-long-line-p' in earlier versions.
+
+Note that `so-long-statistics-excessive-p' requires Emacs 28.1 or later."
:type '(radio (const so-long-statistics-excessive-p)
(const so-long-detected-long-line-p)
(function :tag "Custom function"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- scratch/so-long c241aa2: fixup! Make `global-so-long-mode' use `buffer-line-statistics',
Phil Sainty <=