Function: consult--narrow-setup
consult--narrow-setup is a byte-compiled function defined in
consult.el.
Signature
(consult--narrow-setup CONFIG MAP)
Documentation
Setup narrowing with CONFIG and keymap MAP.
Source Code
;; Defined in ~/.emacs.d/elpa/consult-20260805.1130/consult.el
(defun consult--narrow-setup (config map)
"Setup narrowing with CONFIG and keymap MAP."
(setq consult--narrow-config (if (memq :keys config)
config (list :keys config)))
(when-let* ((key consult-narrow-key))
(setq key (consult--key-parse key))
(dolist (pair (plist-get consult--narrow-config :keys))
(define-key map (vconcat key (vector (car pair)))
(cons (cdr pair) #'consult-narrow))))
(when-let* ((widen (consult--widen-key)))
(define-key map widen (cons "All" #'consult-narrow))))