[emacs] Update 3 drones
[~bandali/configs] / lisp / bbdb / bbdb-rmail.el
... / ...
CommitLineData
1;;; bbdb-rmail.el --- BBDB interface to Rmail -*- lexical-binding: t -*-
2
3;; Copyright (C) 2010-2017 Free Software Foundation, Inc.
4
5;; This file is part of the Insidious Big Brother Database (aka BBDB),
6
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.
11
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.
16
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/>.
19
20;;; Commentary:
21;;; This file contains the BBDB interface to Rmail.
22;;; See the BBDB info manual for documentation.
23
24;;; Code:
25
26(require 'bbdb)
27(require 'bbdb-com)
28(require 'bbdb-mua)
29(require 'rmail)
30(require 'rmailsum)
31(require 'mailheader)
32
33;;;###autoload
34(defun bbdb/rmail-header (header)
35 "Pull HEADER out of Rmail header."
36 (with-current-buffer rmail-buffer
37 (save-restriction
38 (with-no-warnings (rmail-narrow-to-non-pruned-header))
39 (mail-header (intern-soft (downcase header))
40 (mail-header-extract)))))
41
42;;;###autoload
43(defun bbdb-insinuate-rmail ()
44 "Hook BBDB into RMAIL.
45Do 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))
54
55(provide 'bbdb-rmail)
56
57;;; bbdb-rmail.el ends here