[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(Flaw in) tab completion of email addresses in mail buffer
From: |
Kaustuv |
Subject: |
(Flaw in) tab completion of email addresses in mail buffer |
Date: |
10 Jul 2003 01:18:26 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Hi all,
I wrote a elisp function, which is supposed to do the following:
When in the mail mode pressing TAB shall either work as a normal TAB if the
begining of the line where tab was pressed does not has string
"To:". However if the begining of the line is "To:" then it simple calls
bbdb-name-completion function to complete the email address.
(defun bbdb-tab-complete-name
"Tab complete name using BBDB database "
(interactive)
(setq p (point))
(beginning-of-line)
(setq tag (read (current-buffer)))
(goto-char p)
(if (string= tag "To:") (bbdb-complete-name)))
(add-hook 'mail-mode-hook
(lambda ()
(local-set-key [(tab)] 'bbdb-tab-complete-name)))
Even though I can exectue each line of the function correctly when I call
the function as a whole I get Invalid-Function. Can some one suggest why?
Regards
Kaustuv
- (Flaw in) tab completion of email addresses in mail buffer,
Kaustuv <=