Function: logview-switch-to-view-by-index

logview-switch-to-view-by-index is an interactive and natively compiled function defined in logview.el.

Signature

(logview-switch-to-view-by-index)

Documentation

Switch to a view by its quick access index.

This command must be bound to a key with a numeric values, possibly with modifiers, e.g. 3 or M-3.

It is only for interactive use. Non-interactively, use logview-switch-to-view instead.

Key Bindings

logview-mode-map M-0 logview-mode-map M-1 logview-mode-map M-2 logview-mode-map M-3 logview-mode-map M-4 logview-mode-map M-5 logview-mode-map M-6 logview-mode-map M-7 logview-mode-map M-8 logview-mode-map M-9

Source Code

;; Defined in /nix/store/3zkn9hgpv447zb8nrg55d9x2ynmmrk40-emacs-packages-deps/share/emacs/site-lisp/elpa/logview-20260218.2013/logview.el
(defun logview-switch-to-view-by-index ()
  "Switch to a view by its quick access index.
This command must be bound to a key with a numeric values,
possibly with modifiers, e.g. `3' or `M-3'.

It is only for interactive use.  Non-interactively, use
`logview-switch-to-view' instead."
  (interactive)
  (let* ((char  (if (integerp last-command-event)
                    last-command-event
                  (get last-command-event 'ascii-character)))
     (index (- (logand char #x7f) ?0)))
    (unless (<= 0 index 9)
      (user-error "This command must invoked by a numeric key, possibly with modifiers"))
    (logview-switch-to-view index)))