Function: evil-with-view-list
evil-with-view-list is a macro defined in evil-common.el.
Signature
(evil-with-view-list &rest PROPERTIES)
Documentation
Open a new list view buffer.
PROPERTIES is a property-list which supports the following properties:
:name (required) The name of the buffer.
:mode-name (required) The name for the mode line.
:format (required) The value for tabulated-list-format.
:entries (required) The value for tabulated-list-entries.
:select-action (optional) A function for row selection.
It takes a single parameter, which is the
selected row's vector value that is
passed into :entries.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-common.el
(defmacro evil-with-view-list (&rest properties)
"Open a new list view buffer.
PROPERTIES is a property-list which supports the following properties:
:name (required) The name of the buffer.
:mode-name (required) The name for the mode line.
:format (required) The value for `tabulated-list-format'.
:entries (required) The value for `tabulated-list-entries'.
:select-action (optional) A function for row selection.
It takes a single parameter, which is the
selected row's vector value that is
passed into `:entries'."
(declare (indent defun) (debug t))
`(let ((bufname (concat "*" ,(plist-get properties :name) "*"))
(inhibit-read-only t))
(and (get-buffer bufname)
(kill-buffer bufname))
(let ((buf (get-buffer-create bufname)))
(with-current-buffer buf
(setq tabulated-list-format ,(plist-get properties :format))
(setq tabulated-list-entries ,(plist-get properties :entries))
(setq evil-list-view-select-action ,(plist-get properties :select-action))
(evil-list-view-mode)
(setq mode-name ,(plist-get properties :mode-name))
(evil-motion-state))
(switch-to-buffer-other-window buf))))