Function: csv-align-mode

csv-align-mode is an interactive and natively compiled function defined in csv-mode.el.

Signature

(csv-align-mode &optional ARG)

Documentation

Align columns on the fly.

This is a minor mode. If called interactively, toggle the Csv-Align 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 the variable csv-align-mode(var)/csv-align-mode(fun).

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

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/3gmjnyw9n226b7k7jamikx980vf8267p-emacs-packages-deps/share/emacs/site-lisp/elpa/csv-mode-1.27/csv-mode.el
(define-minor-mode csv-align-mode
  "Align columns on the fly."
  :global nil
  (csv-unalign-fields nil (point-min) (point-max)) ;Just in case.
  (cond
   (csv-align-mode
    (add-to-invisibility-spec '(csv-truncate . t))
    (kill-local-variable 'csv--jit-columns)
    (cursor-sensor-mode 1)
    (when (fboundp 'header-line-indent-mode)
      (header-line-indent-mode))
    (jit-lock-register #'csv--jit-align)
    (jit-lock-refontify))
   (t
    (remove-from-invisibility-spec '(csv-truncate . t))
    (jit-lock-unregister #'csv--jit-align)
    (csv--jit-unalign (point-min) (point-max))))
  (csv--header-flush))