emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb f57f374 1/2: Re-instate ebdb-mu4e.el


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb f57f374 1/2: Re-instate ebdb-mu4e.el
Date: Tue, 15 Aug 2017 11:36:53 -0400 (EDT)

branch: externals/ebdb
commit f57f3741b04b5d6a2bbaa5cb191749ae03934ee3
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Re-instate ebdb-mu4e.el
    
    * ebdb-mu4e.el: With changes suggested by Stefan Monnier, to prevent
      compiler errors when mu4e is not present on the system.
---
 ebdb-mu4e.el | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/ebdb-mu4e.el b/ebdb-mu4e.el
new file mode 100644
index 0000000..04fd715
--- /dev/null
+++ b/ebdb-mu4e.el
@@ -0,0 +1,54 @@
+;;; ebdb-mu4e.el --- EBDB interface for mu4e         -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2016-2017  Free Software Foundation, Inc.
+
+;; Author: Eric Abrahamsen <address@hidden>
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; EBDB interface to mu4e.  This file was copied from bbdb-mu4e.el,
+;; originally written by David Sterratt.
+
+;;; Code:
+
+(require 'ebdb-mua)
+(if t (require 'mu4e-view))
+
+(defvar mu4e~view-buffer-name)
+(defvar mu4e-view-mode-map)
+
+;; Tackle `mu4e-headers-mode' later
+
+(cl-defmethod ebdb-mua-message-header ((header string)
+                                      &context (major-mode mu4e-view-mode))
+  (set-buffer mu4e~view-buffer-name)
+  (message-field-value header))
+
+(cl-defmethod ebdb-make-buffer-name (&context (major-mode mu4e-view-mode))
+  "Produce a EBDB buffer name associated with mu4e mode."
+  (format "*%s-mu4e*" ebdb-buffer-name))
+
+(defun ebdb-insinuate-mu4e ()
+  "Hook EBDB into mu4e."
+  ;; Tackle headers later
+  (define-key mu4e-view-mode-map ";" ebdb-mua-keymap))
+
+;; Why wasn't `ebdb-mua-auto-update' ever hooked in to mu4e?
+
+(add-hook 'mu4e-main-mode-hook #'ebdb-insinuate-mu4e)
+
+(provide 'ebdb-mu4e)
+;;; ebdb-mu4e.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]