Variable: dired-omit-mode-hook

dired-omit-mode-hook is a customizable variable defined in dired-x.el.gz.

Value

nil

Documentation

Hook run after entering or leaving dired-omit-mode(var)/dired-omit-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/dired-x.el.gz
;;;###autoload
(define-minor-mode dired-omit-mode
  "Toggle omission of uninteresting files in Dired (Dired-Omit mode).
With prefix argument ARG, enable Dired-Omit mode if ARG is positive,
and disable it otherwise.

If called from Lisp, enable the mode if ARG is omitted or nil.

Dired-Omit mode is a buffer-local minor mode.

When enabled in a Dired buffer, Dired does not list files whose
filenames match regexp `dired-omit-files', files ending with
extensions in `dired-omit-extensions', or files listed on lines
matching `dired-omit-lines'.

To enable omitting in every Dired buffer, you can put this in
your init file:

  (add-hook \\='dired-mode-hook (lambda () (dired-omit-mode)))

See Info node `(dired-x) Omitting Variables' for more information."
  :group 'dired-x
  (if (not dired-omit-mode)
      (revert-buffer)
    (let ((dired-omit-size-limit  nil)
          (file-count 0))
      ;; Omit by file-name match, then omit by line match.
      ;; Use count of file-name match as INIT-COUNT for line match.
      ;; Return total count.  (Return value is not used anywhere, so far).
      (setq file-count (dired-omit-expunge))
      (when dired-omit-lines
        (dired-omit-expunge dired-omit-lines 'LINEP file-count)))))