Created
March 13, 2019 15:22
-
-
Save amirrajan/2bedf8242a4a5f6841bac812357a1e77 to your computer and use it in GitHub Desktop.
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
(defun say-hello () | |
(interactive) | |
(message "hello")) | |
(defun say-goodbye () | |
(interactive) | |
(message "good bye")) | |
(defun say-something () | |
(interactive) | |
(ivy-read "what would you like to say? : " | |
'("hello" "goodbye") | |
:action | |
(lambda (x) | |
(cond | |
((string= x "hello") (say-hello)) | |
((string= x "goodbye") (say-goodbye)) | |
(t (message "no match")))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment