File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -251,6 +251,11 @@ of lines. The center of the region is the position of the
251
251
annotation as defined in the database."
252
252
:type 'number )
253
253
254
+ (defcustom annotate-autosave nil
255
+ " Whether annotations should be saved after each user action,
256
+ e.g. new annotation created, existing one amended or deleted."
257
+ :type 'boolean )
258
+
254
259
(defconst annotate-prop-chain-position
255
260
'position )
256
261
886
891
; with proper text
887
892
(forward-line 1 )
888
893
(goto-char (annotate-end-of-line-pos))
889
- (annotate-annotate)))))))))))))))
894
+ (annotate-annotate))))))))))))
895
+ (when annotate-autosave
896
+ (annotate-save-annotations)))))
890
897
891
898
(defun annotate-toggle-annotation-text ()
892
899
" Hide annotation's text at current cursor's point, if such annotation exists."
@@ -2526,7 +2533,9 @@ point)."
2526
2533
(let* ((delete-confirmed-p (annotate--confirm-annotation-delete)))
2527
2534
(when delete-confirmed-p
2528
2535
(annotate--delete-annotation-chain annotation)
2529
- (font-lock-flush )))))
2536
+ (font-lock-flush )))
2537
+ (when annotate-autosave
2538
+ (annotate-save-annotations))))
2530
2539
2531
2540
(defun annotate--confirm-append-newline-at-the-end-of-buffer ()
2532
2541
" Prompt user for appending newline confirmation.
You can’t perform that action at this time.
0 commit comments