Function: cider--with-temporary-ido-keys
cider--with-temporary-ido-keys is a macro defined in cider-client.el.
Signature
(cider--with-temporary-ido-keys UP DOWN &rest BODY)
Documentation
Temporarily define UP, DOWN keys for ido and execute BODY.
This makes the UX for auto-completion more streamlined,
since one often wants to go to the next candidate (DOWN key)
without having to specify a Java class for the current candidate
(because the current candidate may be irrelevant to the user).
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-client.el
;; Not used anywhere, except in documentation as a suggestion for users.
(defmacro cider--with-temporary-ido-keys (UP DOWN &rest body)
"Temporarily define UP, DOWN keys for ido and execute BODY.
This makes the UX for auto-completion more streamlined,
since one often wants to go to the next candidate (DOWN key)
without having to specify a Java class for the current candidate
\(because the current candidate may be irrelevant to the user)."
`(if (bound-and-true-p ido-common-completion-map)
(let ((original-up-binding (lookup-key ido-common-completion-map (kbd ,UP)))
(original-down-binding (lookup-key ido-common-completion-map (kbd ,DOWN))))
(define-key ido-common-completion-map (kbd ,UP) (lambda ()
(interactive)
(ido-exit-minibuffer)))
(define-key ido-common-completion-map (kbd ,DOWN) (lambda ()
(interactive)
(ido-exit-minibuffer)))
(unwind-protect
(progn ,@body)
(define-key ido-common-completion-map (kbd ,UP) original-up-binding)
(define-key ido-common-completion-map (kbd ,DOWN) original-down-binding)))
,@body))