branch: externals/ebdb
commit 62fcfcfdc4ba08f8b17e43799d1007a46dd966a3
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>
Add ebdb-save to write-contents-functions in EBDB buffers
* ebdb-com.el (ebdb-mode): As of Emacs 6db8491 this will be sufficient
to offer *EBDB* buffers for saving when running save-some-buffers.
Theoretically, we can also bind "s" to save-buffer now.
---
ebdb-com.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ebdb-com.el b/ebdb-com.el
index 2f495b0..a3a4fe0 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -1048,6 +1048,9 @@ Derives from `special-mode'; the usual `special-mode'
bindings apply.
'(:eval (if (object-assoc t 'dirty ebdb-db-list) "**" "--")))
(set (make-local-variable 'revert-buffer-function)
'ebdb-redisplay-all-records)
+ ;; In newer Emacs, this will make EBDB buffers eligible for save by
+ ;; `save-some-buffers'.
+ (setq write-contents-functions (list #'ebdb-save))
(when ebdb-mail-alias-alist
(ebdb-mail-aliases))
(add-hook 'post-command-hook 'force-mode-line-update nil t))