branch: externals/ebdb
commit ccddb0db58078f4726738c1cabe65c0efee94637
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>

    Fix ebdb-save-ebdb for use in save-some-buffers
    
    * ebdb-com.el (ebdb-mode): The save function needs to return t so that
    Emacs doesn't try to save the buffer in a file. It also needs to
    inhibit read only so that `set-buffer-modified-p' doesn't complain.
---
 ebdb-com.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index 09f5011..d3bfbf9 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -1269,7 +1269,11 @@ database."
     (dolist (b (buffer-list))
       (with-current-buffer b
        (when (derived-mode-p 'ebdb-mode)
-         (set-buffer-modified-p nil))))))
+         (let ((inhibit-read-only t))
+           (set-buffer-modified-p nil))))))
+  ;; Make sure to return t, so `write-contents-functions'
+  ;; short-circuits correctly.
+  t)
 
 
 

Reply via email to