Variable: so-long-invisible-buffer-function
so-long-invisible-buffer-function is a customizable variable defined
in so-long.el.gz.
Value
so-long-deferred
Documentation
Function called in place of so-long when the buffer is not displayed.
This affects the behavior of global-so-long-mode(var)/global-so-long-mode(fun).
We treat invisible buffers differently from displayed buffers because, in
cases where a library is using a buffer for behind-the-scenes processing,
it might be surprising if that buffer were unexpectedly manipulated by
so-long (which might in turn lead to confusing errors for the user).
Invisible buffers are less likely to cause performance issues related to
long lines, so this differentiation is generally satisfactory.
The default value so-long-deferred prevents global-so-long-mode(var)/global-so-long-mode(fun) from
triggering so-long for any given buffer until such time as the buffer is
displayed in a window.
(Note that buffers are normally invisible at this point -- when find-file
is used, the buffer is not displayed in a window until a short time after
global-so-long-mode(var)/global-so-long-mode(fun) has seen it.)
The value nil or so-long means that so-long will be called directly; in
which case it may be problematic for so-long-variable-overrides to enable
buffer-read-only, or for so-long-action to be set to so-long-mode.
This is because the buffer may not be intended to be displayed at all, and
the mentioned options might interfere with some intended processing.
This variable was added, or its default value changed, in so-long version 1.0.
Source Code
;; Defined in /usr/src/emacs/lisp/so-long.el.gz
(defcustom so-long-invisible-buffer-function #'so-long-deferred
"Function called in place of `so-long' when the buffer is not displayed.
This affects the behavior of `global-so-long-mode'.
We treat invisible buffers differently from displayed buffers because, in
cases where a library is using a buffer for behind-the-scenes processing,
it might be surprising if that buffer were unexpectedly manipulated by
`so-long' (which might in turn lead to confusing errors for the user).
Invisible buffers are less likely to cause performance issues related to
long lines, so this differentiation is generally satisfactory.
The default value `so-long-deferred' prevents `global-so-long-mode' from
triggering `so-long' for any given buffer until such time as the buffer is
displayed in a window.
\(Note that buffers are normally invisible at this point -- when `find-file'
is used, the buffer is not displayed in a window until a short time after
`global-so-long-mode' has seen it.)
The value nil or `so-long' means that `so-long' will be called directly; in
which case it may be problematic for `so-long-variable-overrides' to enable
`buffer-read-only', or for `so-long-action' to be set to `so-long-mode'.
This is because the buffer may not be intended to be displayed at all, and
the mentioned options might interfere with some intended processing."
:type '(radio (const so-long-deferred)
(const :tag "nil: Call so-long as normal" nil)
(function :tag "Custom function"))
:package-version '(so-long . "1.0"))