Clarify things which are only relevant to 'global-so-long-mode', and
not when the 'so-long' command, or one of its actions, is invoked
directly.
Use the new "customization group" hyperlink syntax.
Only quote 'so-long' as a symbol when it specifically refers to the
command (or will otherwise generate a hyperlink which is appropriate
to the context). When referring to the library more generally, leave
it unquoted.
Changes from commit 63f419f133 are
reverted or improved.
* lisp/so-long.el: (so-long-statistics-excessive-p): New predicate
function using `buffer-line-statistics'.
(so-long-predicate): Use `so-long-statistics-excessive-p' by default.
* etc/NEWS: Describe changes.
* test/lisp/so-long-tests/so-long-tests-helpers.el:
* test/lisp/so-long-tests/so-long-tests.el: Update tests.
Also improve the existing `so-long-tests-predicate' tests.
This reverts commit 3c2db0c541.
A more general solution to bug#45084 has been implemented via
new user options `so-long-mode-preserved-variables' and
`so-long-mode-preserved-minor-modes'.
See the previous commit (before this revert) for details.
The default values support preserving the state of `view-mode' when
switching to (and reverting from) `so-long-mode' (bug#45084).
* lisp/so-long.el (so-long-mode-preserved-variables)
(so-long-mode-preserved-minor-modes): New user options.
(so-long-mode-maintain-preserved-variables)
(so-long-mode-maintain-preserved-minor-modes): New functions.
(so-long-remember-all, so-long-after-change-major-mode)
(so-long-mode-revert): Use them.
* etc/NEWS: Describe changes.
* test/lisp/so-long-tests/so-long-tests-helpers.el:
* test/lisp/so-long-tests/so-long-tests.el: Update tests.
(so-long-disable-minor-modes): Don't call the mode function to disable
the mode unless it was actually enabled.
(so-long-restore-minor-modes, so-long-restore-variables): Use the
remembered list values, which might be different to the defaults.
Also comments, and spelling consistency changes for the so-long tests
(a fixup for commit 83bc4ad369 which had only addressed so-long.el,
and not the test files).
* lisp/so-long.el (so-long-target-modes): Add `fundamental-mode'
* etc/NEWS: Describe changes.
This doesn't affect buffers which are simply in `fundamental-mode' by
default. It only affects buffers for which `set-auto-mode' has been
called (normally via `find-file') without establishing a different
major mode.
* lisp/so-long.el (so-long-threshold, so-long-max-lines): Increase
default values to reduce false-positives.
* etc/NEWS: Describe changes.
Lines shorter than 10,000 characters shouldn't generally be causing
problems, so testing this explicitly will largely eliminate
false-positives. We must also increase the maximum number of lines
to check, because 'minified' code may still include newlines, and so
there may be many lines shorter than the new threshold before we find
a line which exceeds it.
Previously we used a minimum-effort heuristic, testing a very small
number of lines against a maximum length which, while not remotely
long enough to cause problems, would nevertheless be uncommon in any
normal file of programming code (and hence indicative that the file
was likely to be minified code).
Testing indicates that the performance penalty for the larger values
should be negligible.
5d46593568 Support build of Emacs on ARM Macos machines
7f8793e5f1 Update to Org 9.4.4
7b3367a0b5 * lisp/so-long.el: Decrease use of passive voice.
a90836c638 * doc/misc/efaq.texi (New in Emacs 27): Add section.
711fe70dd8 * doc/misc/efaq.texi (Latest version of Emacs): Bump version.
52b30834fb * lisp/face-remap.el (face-remap-set-base): Doc fix. (Bug...
b3fe0ac62e Correct argument order in comment
* lisp/so-long.el (so-long-remember-all, so-long-disable-minor-modes)
(so-long-override-variables): Store and use the `so-long-minor-modes'
and `so-long-variable-overrides' values seen by the original major
mode, so that buffer-local changes made in the major mode hook will be
respected.
Add documentation of this and other major mode hook usage.
* lisp/so-long.el (so-long-detected-long-line-p): Ensure that
`comment-start-skip' and `comment-end-skip' are both set if
`comment-use-syntax' is nil, as `comment-forward' requires them
to be bound in this scenario.
As this `require' is not at the top-level (it is only conditionally
evaluated, when loading the library over the top of an earlier
version), we need `eval-and-compile' to ensure that both macros and
functions from advice.el are accounted for.
Reverting certain changes from commits b0f20651e3 and d1a791f8ed.
Please refer to the comments on spelling at the end of the library.
M-x ispell-buffer should find no misspellings in the documentation.
See also test/lisp/so-long-tests/spelling-tests.el
(The current spelling will persist while so-long.el is maintained in
its own Savannah repository, to avoid unnecessary conflicts between
the two versions. If in the future it is maintained solely in the
Emacs repository, changing the spelling would become an option.)
Note that "mitigations" (plural) is intentional -- this library
identifies a collection of different performance mitigations,
multiple of which will typically be in effect together.
* lisp/so-long.el (so-long-menu): Call `so-long' with an ACTION
argument instead of using `so-long-menu-item-replace-action'.
(so-long-menu-item-replace-action): Remove the deprecated function.
* test/lisp/so-long-tests/so-long-tests.el
(so-long-tests-so-long-menu-item-replace-action): Update the test.
This makes `so-long' consistent with the action commands in the menu.
If multiple actions were to be layered on top of one another, we would
lose the ability to revert to the normal state. Custom actions
combining multiple other actions can be defined if necessary.
* lisp/so-long.el (so-long-menu, so-long-menu-item-replace-action)
(so-long-revert): Use interactive code "@", replacing all uses of
`so-long-menu-click-window'. This approach leaves the window selected
afterwards, whereas the old code did not; but that is not a problem.
(so-long-menu-click-window, so-long-menu-item-revert): Remove the
deprecated functions.
* test/lisp/so-long-tests/so-long-tests.el
(so-long-tests-so-long-menu-item-replace-action): Update the test.
Co-authored-by: Phil Sainty <psainty@orcon.net.nz>