[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 7ef0399 2/3: New ebdb-shutdown command
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 7ef0399 2/3: New ebdb-shutdown command |
Date: |
Fri, 27 Oct 2017 19:06:55 -0400 (EDT) |
branch: externals/ebdb
commit 7ef0399dc0a8803a193fc1321fb482f8a630f9c6
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
New ebdb-shutdown command
* ebdb-com.el (ebdb-shutdown): Saves, closes everything, and clears
variables. Probably mostly useful to myself.
---
ebdb-com.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/ebdb-com.el b/ebdb-com.el
index a2aeb36..da56958 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -1342,6 +1342,17 @@ reloaded with `ebdb-reload-database'."
(ebdb-db-disable db)
(message "Database %s is disabled." (ebdb-string db)))))
+(defun ebdb-shutdown ()
+ "Save databases, kill buffers, and clear variables."
+ (interactive)
+ (ebdb-save)
+ (dolist (b (buffer-list))
+ (with-current-buffer b
+ (when (derived-mode-p 'ebdb-mode)
+ (kill-buffer))))
+ (ebdb-clear-vars)
+ (message "EBDB shutdown complete"))
+
;; clean-up functions