[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb e1efb02 8/9: Add before-save-hook and after-save-h
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb e1efb02 8/9: Add before-save-hook and after-save-hook |
Date: |
Tue, 13 Aug 2019 21:46:51 -0400 (EDT) |
branch: externals/ebdb
commit e1efb0200ac4cde39de22b8a0694696e9ff58794
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Add before-save-hook and after-save-hook
* ebdb.el (ebdb-before-save-hook, ebdb-after-save-hook): New hooks, as
options.
(ebdb-save): Run them.
---
ebdb.el | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/ebdb.el b/ebdb.el
index f7d03e7..9280474 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -359,6 +359,14 @@ anniversary date, and the sexp (as a string):
:group 'ebdb
:type 'hook)
+(defcustom ebdb-before-save-hook nil
+ "Hook run before saving all databases."
+ :type 'hook)
+
+(defcustom ebdb-after-save-hook nil
+ "Hook run after saving all databases."
+ :type 'hook)
+
(defvar ebdb-create-hook nil
"*Hook run each time a new EBDB record is created.
Run with one argument, the new record. This is called before the record is
@@ -5179,9 +5187,11 @@ additionally prompt to save each database individually."
;; TODO: Reimplement ebdb-remote-file, or otherwise do something
;; about that.
(when interactive
- (message "Saving the EBDB..."))
+ (message "Saving the EBDB..."))
+ (run-hooks 'ebdb-before-save-hook)
(dolist (s ebdb-db-list)
(ebdb-db-save s (eq interactive 4)))
+ (run-hooks 'ebdb-after-save-hook)
(when interactive
(message "Saving the EBDB... done")))
- [elpa] externals/ebdb updated (3bf66d6 -> 03fcfae), Eric Abrahamsen, 2019/08/13
- [elpa] externals/ebdb 4a78f58 2/9: Fix redisplay in ebdb-with-record-edits, Eric Abrahamsen, 2019/08/13
- [elpa] externals/ebdb 2a87f5e 3/9: Fix one-primary-mail-per-record constraint, Eric Abrahamsen, 2019/08/13
- [elpa] externals/ebdb bb0340e 1/9: Stick ebdb-vm.el in its own branch until it's usable, Eric Abrahamsen, 2019/08/13
- [elpa] externals/ebdb 5d9c9b0 6/9: Add a method for parsing US phone numbers, fix phone parsing, Eric Abrahamsen, 2019/08/13
- [elpa] externals/ebdb e1efb02 8/9: Add before-save-hook and after-save-hook,
Eric Abrahamsen <=
- [elpa] externals/ebdb 31fb567 5/9: Merge remote-tracking branch 'github/VM-mua', Eric Abrahamsen, 2019/08/13
- [elpa] externals/ebdb b9ebce9 4/9: Provide MUA-specific versions of ebdb-mua-auto-update-p, Eric Abrahamsen, 2019/08/13
- [elpa] externals/ebdb 365b9fb 7/9: Fix mua-auto-update customization values, Eric Abrahamsen, 2019/08/13
- [elpa] externals/ebdb 03fcfae 9/9: Allow permanent ignoring of mail addresses, Eric Abrahamsen, 2019/08/13