Variable: global-so-long-mode
global-so-long-mode is a customizable variable defined in
so-long.el.gz.
Value
nil
Documentation
Non-nil if the so-long library's automated functionality is enabled.
Use M-x so-long-commentary (so-long-commentary) for more information.
Setting this variable directly does not take effect;
either customize it (see the info node (emacs)Easy Customization)
or call the function global-so-long-mode(var)/global-so-long-mode(fun).
Probably introduced at or before Emacs version 27.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/so-long.el.gz
;;;###autoload
(define-minor-mode global-so-long-mode
"Toggle automated performance mitigations for files with long lines.
Many Emacs modes struggle with buffers which contain excessively long lines,
and may consequently cause unacceptable performance issues.
This is commonly on account of \"minified\" code (i.e. code that has been
compacted into the smallest file size possible, which often entails removing
newlines should they not be strictly necessary).
When such files are detected by `so-long-predicate', we invoke the selected
`so-long-action' to mitigate potential performance problems in the buffer.
Use \\[so-long-commentary] for more information.
Use \\[so-long-customize] to open the customization group `so-long' to
configure the behavior."
:global t
(if global-so-long-mode
;; Enable
(progn
(so-long--enable)
(advice-add 'hack-local-variables :around
#'so-long--hack-local-variables)
(advice-add 'set-auto-mode :around
#'so-long--set-auto-mode)
(when (< emacs-major-version 26)
(advice-add 'hack-one-local-variable :around
#'so-long--hack-one-local-variable)))
;; Disable
(so-long--disable)
(advice-remove 'hack-local-variables #'so-long--hack-local-variables)
(advice-remove 'set-auto-mode #'so-long--set-auto-mode)
(when (< emacs-major-version 26)
(advice-remove 'hack-one-local-variable
#'so-long--hack-one-local-variable))))