Browse Source

Add a hook run when a contact has been edited

* khardel.el:
(khardel-edit-finished-hook): New variable.
(khardel-edit-finish): Run the new hook after the edition is completed.
tags/v0.2.0
Nicolas Petton 1 year ago
parent
commit
89fafe4c61
No known key found for this signature in database
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      khardel.el

+ 6
- 1
khardel.el View File

@@ -38,6 +38,10 @@
"Path to the khard executable file."
:type 'file)

(defcustom khardel-edit-finished-hook nil
"Hook run when a contact edition is completed."
:type 'hook)

(defvar khardel--emails nil
"Cache a list of strings of the form \"Name <email>\".")

@@ -142,7 +146,8 @@ If nil, the buffer represents a new contact.")
"khard"
nil t nil
args))
(kill-buffer))))
(kill-buffer)
(run-hooks 'khardel-edit-finished-hook))))

;;;###autoload
(defun khardel-insert-email ()

Loading…
Cancel
Save