The function `fill-region-as-paragraph' leaves a temporal marker which isn't cleared in the buffer. Here is the structure of `fill-region-as-paragraph': ---------------------------------------------------------------------- (defun fill-region-as-paragraph (from to &optional justify nosqueeze squeeze-after) [...] (setq to (copy-marker (point) t)) [...] (if (not (> to (point))) nil ;; There is no paragraph, only whitespace: exit now. [...] (goto-char to) (unless (eobp) (forward-char 1)) ;; Return the fill-prefix we used fill-prefix))) ---------------------------------------------------------------------- With this code, temporal marker bound to local variable `to' is left in the buffer. According to elisp reference `(elisp) Overview of Markers', it is recommended to clear such stale marker with suitable `(set-marker MARKER nil)': ,---- | Insertion and deletion in a buffer must check all the markers and | relocate them if necessary. This slows processing in a buffer with a | large number of markers. For this reason, it is a good idea to make a | marker point nowhere if you are sure you don’t need it any more. `---- I'd propose to apply the attached patch to accomplish that. Regards, Ikumi Keita