2011-04-13 Sam Steingold <s...@gnu.org>
* bbdb.el (bbdb-mode-map): inherit from `special-mode-map'
(bbdb-mode): set `revert-buffer-function'
diff --git a/lisp/bbdb.el b/lisp/bbdb.el
index 74f3cfc..ad7e966 100644
--- a/lisp/bbdb.el
+++ b/lisp/bbdb.el
@@ -1366,7 +1366,9 @@ APPEND and INVERT appear in the message area.")
;;; Keymap
(defvar bbdb-mode-map
(let ((km (make-sparse-keymap)))
- (suppress-keymap km)
+ (if (and (fboundp 'set-keymap-parent) (boundp 'special-mode-map))
+ (set-keymap-parent km special-mode-map)
+ (suppress-keymap km))
(define-key km "*" 'bbdb-do-all-records)
(define-key km "+" 'bbdb-append-display)
(define-key km "!" 'bbdb-search-invert)
@@ -1387,7 +1389,8 @@ APPEND and INVERT appear in the message area.")
(define-key km "m" 'bbdb-mail)
(define-key km "M" 'bbdb-mail-address)
(define-key km "\M-d" 'bbdb-dial)
- (define-key km "g" 'bbdb-revert-buffer)
+ (unless (boundp 'revert-buffer-function)
+ (define-key km "g" 'bbdb-revert-buffer))
(define-key km "h" 'bbdb-info)
(define-key km "?" 'bbdb-help)
(define-key km "q" 'bbdb-bury-buffer)
@@ -3107,6 +3110,8 @@ There are numerous hooks. M-x apropos ^bbdb.*hook RET
mode-line-modified
'(bbdb-read-only (bbdb-modified "%*" "%%")
(bbdb-modified "**" "--")))
+ (when (boundp 'revert-buffer-function)
+ (setq revert-buffer-function 'bbdb-revert-buffer))
(add-hook 'post-command-hook 'force-mode-line-update nil t)
(use-local-map bbdb-mode-map)
(run-hooks 'bbdb-mode-hook))
--
Sam Steingold (http://sds.podval.org/) on CentOS release 5.5 (Final) X
11.0.60900031
http://honestreporting.com http://memri.org http://iris.org.il
http://www.memritv.org http://www.PetitionOnline.com/tap12009/
As a computer, I find your faith in technology amusing.
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/