From b0a7a19d5ddef9887032fe3c2f943e6b6545f253 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 25 Oct 2020 14:34:47 +0100 Subject: [PATCH] Fix problem when replacing the final char in checkdoc * lisp/emacs-lisp/checkdoc.el (checkdoc-autofix-ask-replace): Ensure that the end-of-doc-string marker is really at the end, even if we replace the final " char in the string (bug#44201). --- lisp/emacs-lisp/checkdoc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 23121c245ef..a485378a926 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -2589,7 +2589,7 @@ This function will not modify `match-data'." ;; going on. (if checkdoc-bouncy-flag (message "%s -> done" question)) (delete-region start end) - (insert replacewith) + (insert-before-markers replacewith) (if checkdoc-bouncy-flag (sit-for 0)) (setq ret t))) (delete-overlay o) -- 2.39.2