Created
August 20, 2018 15:51
-
-
Save nxtr/dc46f21342ee62943a8a7d27a09e2324 to your computer and use it in GitHub Desktop.
Key binding of a lambda function as a uninterned symbol,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-key ivy-mode-map (kbd "C-s") | |
(defalias (make-symbol "swiper-or-swiper-all") | |
;; Wrapped in `defalias' with uninterned SYMBOL so `describe-key' | |
;; displays command as a proper symbol instead of byte-codes | |
(lambda () | |
"Runs the command swiper. | |
With a prefix argument, run the command swiper-all." | |
(interactive) | |
(if current-prefix-arg | |
(swiper-all) | |
(swiper))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment