1 ;;; bbdb-wl.el --- BBDB interface to Wanderlust -*- lexical-binding: t -*-
3 ;; Copyright (C) 2015-2017 Free Software Foundation, Inc.
5 ;; This file is part of the Insidious Big Brother Database (aka BBDB),
7 ;; BBDB is free software: you can redistribute it and/or modify
8 ;; it under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation, either version 3 of the License, or
10 ;; (at your option) any later version.
12 ;; BBDB is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;; GNU General Public License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with BBDB. If not, see <http://www.gnu.org/licenses/>.
21 ;; This file contains the BBDB interface to Wl.
22 ;; See the BBDB info manual for documentation.
29 (defvar wl-summary-mode-map
)
30 (defvar wl-draft-mode-map
)
31 (defvar wl-summary-buffer-elmo-folder
)
33 (autoload 'wl-summary-message-number
"wl-summary")
34 (autoload 'elmo-message-entity
"elmo-msgdb")
35 (autoload 'elmo-message-entity-field
"elmo-msgdb"))
38 (defun bbdb/wl-header
(header)
39 (elmo-message-entity-field
40 (elmo-message-entity wl-summary-buffer-elmo-folder
41 (wl-summary-message-number))
42 (intern (downcase header
)) 'string
))
45 (defun bbdb-insinuate-wl ()
46 "Hook BBDB into Wanderlust."
47 (define-key wl-summary-mode-map
(kbd ":") #'bbdb-mua-display-sender
)
48 (define-key wl-summary-mode-map
(kbd ";") #'bbdb-mua-edit-field-sender
)
49 (when bbdb-complete-mail
50 (define-key wl-draft-mode-map
(kbd "M-;") #'bbdb-complete-mail
)
51 (define-key wl-draft-mode-map
(kbd "M-<tab>") #'bbdb-complete-mail
)))
55 ;;; bbdb-wl.el ends here