1 ;;; bbdb-rmail.el --- BBDB interface to Rmail -*- lexical-binding: t -*-
3 ;; Copyright (C) 2010-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 Rmail.
22 ;;; See the BBDB info manual for documentation.
34 (defun bbdb/rmail-header
(header)
35 "Pull HEADER out of Rmail header."
36 (with-current-buffer rmail-buffer
38 (with-no-warnings (rmail-narrow-to-non-pruned-header))
39 (mail-header (intern-soft (downcase header
))
40 (mail-header-extract)))))
43 (defun bbdb-insinuate-rmail ()
44 "Hook BBDB into RMAIL.
45 Do not call this in your init file. Use `bbdb-initialize'."
46 ;; Do we need keybindings for more commands? Suggestions welcome.
47 ;; (define-key rmail-mode-map ":" 'bbdb-mua-display-records)
48 ;; (define-key rmail-mode-map "'" 'bbdb-mua-display-recipients)
49 (define-key rmail-mode-map
":" 'bbdb-mua-display-sender
)
50 (define-key rmail-mode-map
";" 'bbdb-mua-edit-field-sender
)
51 ;; (define-key rmail-mode-map ";" 'bbdb-mua-edit-field-recipients)
52 (define-key rmail-summary-mode-map
":" 'bbdb-mua-display-sender
)
53 (define-key rmail-summary-mode-map
";" 'bbdb-mua-edit-field-sender
))
57 ;;; bbdb-rmail.el ends here