I’m new to Emacs and am trying to write a few Emacs Lisp functions.
I’d like to write a function that takes two parameters and can handle being interactive. However, one of the parameters is a boolean — it’d be perfect if I could use (y-or-no-p), but (interactive) doesn’t seem to have a character code for that.
Any ideas?
Update: I’m using GNU Emacs 23.
Also, here’s what my function looks like so far:
(defun foo (str bool)
(interactive "sSome text: \nsDo the thing?")
(some-func str)
(if bool (some-other-func str)))
Ah, found it.