Skip to content

Commit e84f6ab

Browse files
committed
Add after hook.
1 parent 005a91f commit e84f6ab

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docstr.el

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@
100100
:type 'hook
101101
:group 'docstr)
102102

103+
(defcustom docstr-after-insert-hook nil
104+
"Hooks run after inserting document string."
105+
:type 'hook
106+
:group 'docstr)
103107

104108
(defun docstr--get-type-name (type)
105109
"Return TYPE's name."
@@ -220,7 +224,8 @@ You should customize this variable to add your own triggeration methods."
220224
(progn
221225
(run-hook-with-args 'docstr-before-insert-hook search-string)
222226
(save-excursion (funcall (cdr writer) search-string))
223-
(end-of-line))
227+
(end-of-line)
228+
(run-hook-with-args 'docstr-after-insert-hook search-string))
224229
(user-error "[WARNING] No document string support for %s" major-mode))))
225230

226231
(defun docstr--get-search-string (type sr)

0 commit comments

Comments
 (0)