Uwe Brauer writes:
(defun bbdb-check-dict (ch)
"Just check whether we have set the dict."
(interactive "c")
(if (y-or-n-p (format "Did you set the dict? "))
(message "Dict seems to be set.")
(bbdb-select-dict ch)))
I'm unclear on what you're trying to do, but I can tell you what this
function will do in response to M-x bbdb-check-dict RET:
1. It will wait for you to type a character in the minibuffer without
a visible prompt because of the `(interactive "c")', then
2. It will ask you if you set the dictionary, and if you say yes, it
exits without doing anything.
3. If you say no, it calls `bbdb-select-dict' with the ch you typed,
without any interaction.
If you don't want the interactive function to prompt, then you can
either use "i" for all arguments (and they will all default to nil),
or you can rewrite the function without arguments and use a bare
`(interactive)' to tell XEmacs it's a command.
If you want `bbdb-select-dict' to prompt, you need to use
`call-interactively'.
My best guess for what you want is
(defun bbdb-check-dict ()
(interactive)
(if (y-or-n-p "Did you set the dict? ") ; no need for `format'
(message "Dict seems to be set.")
(call-interactively #'bbdb-select-dict)))
It's your function, so do what you want, but I suspect with experience
with this function, you will get bored with the second prompt very
quickly. I suggest to either add a case so that ?q quits, or just use
C-g.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/mailman/listinfo/xemacs-beta