Hello
That is most likely very elementary but I don't get it to
work.
I have an interactive function with some input arguments.
(defun bbdb-select-dict (ch)
"This function allows select the different ispell dicts+abbrev table."
(interactive "c1: deutsch, 2: british, 3: american, 4: castellano 5: francais|
")
(setq ch (downcase ch))
(call-interactively (cond ((eql ch ?1) #'my-new-set-german)
((eql ch ?2) #'my-new-set-british)
((eql ch ?2) #'my-new-set-american)
((eql ch ?2) #'my-new-set-castellano)
((eql ch ?3) #'my-new-set-francais)
(t (error 'args-out-of-range '(1 2 3 4 5 ch)))))))
Now I want to have a new interactive function, bbdb-check-dict
- which let you decide to call bbdb-select-dict, or
- calls bbdb-select-dict if a variable is set.
So I tried for 1.
(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)))
But this does not work.
I want to avoid to have the (interactive "c1: deutsch, 2: british, 3: american, 4:
castellano 5: francais| ")
because then I am forced to type an select *before* the functions
body is executed.
For 2 I am faced with the same problem
(defun bbdb-check-dict (ch)
(interactive "c")
(unless ispell-dictionary
(bbdb-select-dict ch)))
Does not work neither.
What do I miss?
Thanks
Uwe Brauer
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/mailman/listinfo/xemacs-beta