I have these commits sitting in my local git repo and I think they might
be good for upstream so I am posting them here.

>From 90ec35b4ef69ef37337d104fe08c447af5ce7da8 Mon Sep 17 00:00:00 2001
From: Leo <sdl....@gmail.com>
Date: Mon, 2 May 2011 23:02:41 +0800
Subject: [PATCH 2/9] Add bbdb-load-hook

---
 lisp/bbdb.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/bbdb.el b/lisp/bbdb.el
index 13cad54a..a1faf946 100644
--- a/lisp/bbdb.el
+++ b/lisp/bbdb.el
@@ -3861,3 +3861,5 @@ (defun bbdb-initialize (&rest muas)
 
 
 (provide 'bbdb)
+
+(run-hooks 'bbdb-load-hook)
-- 
1.7.12

>From ff2f3d044b78c0c4ff3070b664fe55121ec73ccc Mon Sep 17 00:00:00 2001
From: Leo <sdl....@gmail.com>
Date: Sun, 8 May 2011 02:01:28 +0800
Subject: [PATCH 3/9] Edebug support for macro bbdb-mua-wrapper

---
 lisp/bbdb-mua.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/bbdb-mua.el b/lisp/bbdb-mua.el
index 862e21a0..e365a19c 100644
--- a/lisp/bbdb-mua.el
+++ b/lisp/bbdb-mua.el
@@ -542,6 +542,7 @@ (defun bbdb-mua-update-records (&optional header-class update-p)
 
 (defmacro bbdb-mua-wrapper (&rest body)
   "Perform BODY in a MUA buffer."
+  (declare (debug t))
   `(let ((mua (bbdb-mua)))
      ;; Here we replicate BODY multiple times which gets clumsy
      ;; for a larger BODY!
-- 
1.7.12

>From 6b1d628a2987e9c3cc8d9396f5a6edd8fad5f9d8 Mon Sep 17 00:00:00 2001
From: Leo <sdl....@gmail.com>
Date: Thu, 22 Sep 2011 10:17:40 +0800
Subject: [PATCH 5/9] Fix bbdb-insinuate-gnus for gnus-article-mode

It seems when key is not bound in gnus-article-mode-map, Gnus will
reconfigure its window layout to get the key definition from
gnus-summary-mode. This interferes with window configuration changes
made by bbdb-mua-display-sender and bbdb-mua-edit-notes-sender. So
bind them directly in the article mode.

Without this commit, for example, bbdb-mua-display-sender in
gnus-article-mode does not pop up the *BBDB* buffer.
---
 lisp/bbdb-gnus.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/bbdb-gnus.el b/lisp/bbdb-gnus.el
index e2043029..f3a1e9b2 100644
--- a/lisp/bbdb-gnus.el
+++ b/lisp/bbdb-gnus.el
@@ -574,9 +574,11 @@ (defun bbdb-insinuate-gnus ()
   ;; `gnus-article-read-summary-keys' provides an additional wrapper
   ;; that restores the window configuration.
   (define-key gnus-summary-mode-map ":" 'bbdb-mua-display-sender)
+  (define-key gnus-article-mode-map ":" 'bbdb-mua-display-sender)
   ;; For `bbdb-mua-edit-field-sender' it is probably OK if
   ;;`gnus-article-read-summary-keys' restores the window configuration.
   (define-key gnus-summary-mode-map ";" 'bbdb-mua-edit-field-sender)
+  (define-key gnus-article-mode-map ";" 'bbdb-mua-edit-field-sender)
   ;; Do we need keybindings for more commands?  Suggestions welcome.
   ;; (define-key gnus-summary-mode-map ":" 'bbdb-mua-display-records)
   ;; (define-key gnus-summary-mode-map "'" 'bbdb-mua-display-recipients)
-- 
1.7.12

>From 05bc7b770ced88a002fe6e654e52090385368da5 Mon Sep 17 00:00:00 2001
From: Leo <sdl....@gmail.com>
Date: Sun, 27 Nov 2011 01:28:34 +0800
Subject: [PATCH 8/9] Fail early in bbdb-grab-url if no url at point

---
 lisp/bbdb-com.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/bbdb-com.el b/lisp/bbdb-com.el
index d4f84278..25322f23 100644
--- a/lisp/bbdb-com.el
+++ b/lisp/bbdb-com.el
@@ -2256,8 +2256,10 @@ (defun bbdb-browse-url (records &optional which)
 ;;;###autoload
 (defun bbdb-grab-url (record url)
   "Grab URL and store it in RECORD."
-  (interactive (list (bbdb-completing-read-record "Add URL for: ")
-                     (browse-url-url-at-point)))
+  (interactive (let ((url (or (browse-url-url-at-point)
+                              (error "No url at point"))))
+                 (list (bbdb-completing-read-record
+                        (format "Add %s for: " url)) url)))
   (bbdb-record-set-field record 'url url t)
   (bbdb-change-record record)
   (bbdb-display-records (list record)))
-- 
1.7.12

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to