Skip to content

Instantly share code, notes, and snippets.

@amirrajan
Created March 13, 2019 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amirrajan/2bedf8242a4a5f6841bac812357a1e77 to your computer and use it in GitHub Desktop.
Save amirrajan/2bedf8242a4a5f6841bac812357a1e77 to your computer and use it in GitHub Desktop.
(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