Function: so-long-minor-mode

so-long-minor-mode is an autoloaded, interactive and byte-compiled function defined in so-long.el.gz.

Signature

(so-long-minor-mode &optional ARG)

Documentation

This is the minor mode equivalent of so-long-mode.

Any active minor modes listed in so-long-minor-modes are disabled for the current buffer, and buffer-local values are assigned to variables in accordance with so-long-variable-overrides.

This minor mode is a standard so-long-action option.

This is a minor mode. If called interactively, toggle the So-Long minor mode mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer, evaluate so-long-minor-mode(var)/so-long-minor-mode(fun).

The mode's hook is called both when the mode is enabled and when it is disabled.

Probably introduced at or before Emacs version 29.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/so-long.el.gz
;;;###autoload
(define-minor-mode so-long-minor-mode
  "This is the minor mode equivalent of `so-long-mode'.

Any active minor modes listed in `so-long-minor-modes' are disabled for the
current buffer, and buffer-local values are assigned to variables in accordance
with `so-long-variable-overrides'.

This minor mode is a standard `so-long-action' option."
  :lighter nil
  (if so-long-minor-mode ;; We are enabling the mode.
      (progn
        ;; Housekeeping.  `so-long-minor-mode' might be invoked directly rather
        ;; than via `so-long', so replicate the necessary behaviors.  The minor
        ;; mode also cares about whether `so-long' was already active, as we do
        ;; not want to remember values which were (potentially) overridden
        ;; already.
        (unless (or so-long--calling so-long--active)
          (so-long--ensure-enabled)
          (setq so-long--active t
                so-long-detected-p t
                so-long-function 'turn-on-so-long-minor-mode
                so-long-revert-function 'turn-off-so-long-minor-mode)
          (so-long-remember-all :reset)
          (unless (derived-mode-p 'so-long-mode)
            (setq so-long-mode-line-info (so-long-mode-line-info))))
        ;; Now perform the overrides.
        (so-long-disable-minor-modes)
        (so-long-override-variables))
    ;; We are disabling the mode.
    (unless so-long--calling ;; Housekeeping.
      (when (eq so-long-function 'turn-on-so-long-minor-mode)
        (setq so-long--active nil))
      (unless (derived-mode-p 'so-long-mode)
        (setq so-long-mode-line-info (so-long-mode-line-info))))
    ;; Restore the overridden settings.
    (so-long-restore-minor-modes)
    (so-long-restore-variables)))