Variable: proced-mode-hook

proced-mode-hook is a variable defined in proced.el.gz.

Value

nil

Documentation

Hook run after entering Proced mode.

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/proced.el.gz
;; proced mode

(define-derived-mode proced-mode special-mode "Proced"
  "Mode for displaying system processes and sending signals to them.
Type \\[proced] to start a Proced session.  In a Proced buffer
type \\<proced-mode-map>\\[proced-mark] to mark a process for later commands.
Type \\[proced-send-signal] to send signals to marked processes.
Type \\[proced-renice] to renice marked processes.

The initial content of a listing is defined by the variable
`proced-filter' and the variable `proced-format'.

The variable `proced-filter' specifies which system processes are
displayed.

The variable `proced-format' specifies which attributes are
displayed for each process.

Type \\[proced-filter-interactive] and \\[proced-format-interactive] to \
change the values of `proced-filter' and
`proced-format'.  The current value of the variable
`proced-filter' is indicated in the mode line.

The sort order of Proced listings is defined by the variable `proced-sort'.
Type \\[proced-sort-interactive] or click on a header in the header \
line to change the sort scheme.
The current sort scheme is indicated in the mode line, using
\"+\" or \"-\" for ascending or descending sort order.

Type \\[proced-toggle-tree] to toggle whether the listing is displayed as process tree.

Type \\[proced-toggle-auto-update] to automatically update the
process list.  The time interval for updates can be configured
via `proced-auto-update-interval'.

An existing Proced listing can be refined by typing \\[proced-refine].
Refining an existing listing does not update the variable `proced-filter'.

The attribute-specific rules for formatting, filtering, sorting,
and refining are defined in `proced-grammar-alist'.

After displaying or updating a Proced buffer, Proced runs the
normal hook `proced-post-display-hook'.

\\{proced-mode-map}"
  :interactive nil
  (abbrev-mode 0)
  (auto-fill-mode 0)
  (setq buffer-read-only t
        truncate-lines t
        header-line-format '(:eval (proced-header-line)))
  (add-hook 'post-command-hook #'force-mode-line-update nil t)  ;; FIXME: Why?
  (setq-local revert-buffer-function #'proced-revert)
  (setq-local font-lock-defaults
              '(proced-font-lock-keywords t nil nil beginning-of-line))
  (if (and (not proced-auto-update-timer) proced-auto-update-interval)
      (setq proced-auto-update-timer
            (run-at-time t proced-auto-update-interval
                         'proced-auto-update-timer))))