Based on a hint from Jack Repenning ([EMAIL PROTECTED]) about
mh-e version 4 having a different interface than version 3, I've made
a fix for bbdb-mhe.el.  The enclosed patch require's the necessary
additional mh-e files and installs bbdb/mh-update-record in the right
hook.

This does the trick for me.

Ray

Ray -----> [EMAIL PROTECTED]
Toy -----> Ericsson-GE RTP x7480

*** bbdb-mhe.el~        Sat Feb  5 06:49:18 1994
--- bbdb-mhe.el Fri Aug 26 11:30:32 1994
***************
*** 23,28 ****
--- 23,32 ----
  
  (require 'bbdb)
  (require 'mh-e)    ; Note- we advise several functions in this file.
+ (if (boundp 'mh-e-version)
+     (progn
+       (require 'mh-comp)
+       (require 'mh-utils)))
  (require 'advice)
  
  (defmacro bbdb/mh-cache-key (message)
***************
*** 148,156 ****
    "Invoked after message is displayed in buffer.")
  
  ;; Modify mh-display-msg to call mh-show-message-hook after setting up
! ;; the message
! (defadvice mh-display-msg (after mh-bbdb-display-msg act)
!   (run-hooks 'mh-show-message-hook))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;; this is a more strict version of mh-get-field which takes an regexp
--- 152,161 ----
    "Invoked after message is displayed in buffer.")
  
  ;; Modify mh-display-msg to call mh-show-message-hook after setting up
! ;; the message.  But not for mh-e version 4 (which defines mh-e-version).
! (if (not (boundp 'mh-e-version))
!     (defadvice mh-display-msg (after mh-bbdb-display-msg act)
!       (run-hooks 'mh-show-message-hook)))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;; this is a more strict version of mh-get-field which takes an regexp
***************
*** 269,275 ****
    "Call this function to hook BBDB into MH-E."
    (define-key mh-folder-mode-map ":" 'bbdb/mh-show-sender)
    (define-key mh-folder-mode-map ";" 'bbdb/mh-edit-notes)
!   (bbdb-add-hook 'mh-show-message-hook 'bbdb/mh-update-record)
    )
  
  (provide 'bbdb-mhe)
--- 274,282 ----
    "Call this function to hook BBDB into MH-E."
    (define-key mh-folder-mode-map ":" 'bbdb/mh-show-sender)
    (define-key mh-folder-mode-map ";" 'bbdb/mh-edit-notes)
!   (if (not (boundp 'mh-e-version))
!       (bbdb-add-hook 'mh-show-message-hook 'bbdb/mh-update-record)
!     (bbdb-add-hook 'mh-show-mode-hook 'bbdb/mh-update-record))
    )
  
  (provide 'bbdb-mhe)

Reply via email to