Variable: global-so-long-mode-hook

global-so-long-mode-hook is a customizable variable defined in so-long.el.gz.

Value

nil

Documentation

Hook run after entering or leaving global-so-long-mode(var)/global-so-long-mode(fun).

No problems result if this variable is not bound. add-hook automatically binds it. (This is true for all hook variables.)

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
  :group 'so-long
  (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))))