>>>> On Tue, 21 Sep 2010 23:55:47 +0900, "Stephen J.
Turnbull" <stephen(a)xemacs.org> wrote:
[snip]
(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)))
Right this indeed what I wanted. Thanks.
So
call-interactively was the function I was looking for,
which was used in the original function grrrr
However thinking a little for a while I think this approach
is not very comfortable.
I have a function, called,
bbdb-change-ispell, which sets the ispell dictionary (and
the abbrev-table) according to a bbdb field,
(ispell-dictionary) in the corresponding bbdb entry.
bbdb-change-ispell, is then inserted into the
bbdb-mail-abbrev-expand-hook.
However not all bbdb entries have the ispell-dictionary
field. So the checking function should be something like
this
(defun bbdb-check-dict ()
(interactive)
(unless ispell-dictionary
(call-interactively #'bbdb-select-dict-new)))
I could put that function also into the
bbdb-mail-abbrev-expand-hook but it essential that it gets
executed *after* bbdb-change-ispell, but I am never sure
which functions gets executed first in the hook
,----
| `bbdb-mail-abbrev-expand-hook' is a variable declared in Lisp.
| -- loaded from "bbdb-com"
|
| Value: (bbdb-change-ispell add-bbdbadpt-gcc add-sigadapt)
`----
it seems that first bbdb-change-ispell is excecuted but I am
never sure.
So I thought to advice message-goto-message and execute
bbdb-check-dict after message-goto-body. However that was
a nightmare since message-goto-body was called by a zillions
of functions. So I had to write up my-message-goto-body and
call bbdb-check-dict.
Uwe Brauer
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/mailman/listinfo/xemacs-beta