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
251251annotation as defined in the database."
252252 :type 'number )
253253
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+
254259(defconst annotate-prop-chain-position
255260 'position )
256261
886891 ; with proper text
887892 (forward-line 1 )
888893 (goto-char (annotate-end-of-line-pos))
889- (annotate-annotate)))))))))))))))
894+ (annotate-annotate))))))))))))
895+ (when annotate-autosave
896+ (annotate-save-annotations)))))
890897
891898(defun annotate-toggle-annotation-text ()
892899 " Hide annotation's text at current cursor's point, if such annotation exists."
@@ -2526,7 +2533,9 @@ point)."
25262533 (let* ((delete-confirmed-p (annotate--confirm-annotation-delete)))
25272534 (when delete-confirmed-p
25282535 (annotate--delete-annotation-chain annotation)
2529- (font-lock-flush )))))
2536+ (font-lock-flush )))
2537+ (when annotate-autosave
2538+ (annotate-save-annotations))))
25302539
25312540(defun annotate--confirm-append-newline-at-the-end-of-buffer ()
25322541 " Prompt user for appending newline confirmation.
You can’t perform that action at this time.
0 commit comments