]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve 'refill-mode' in Org buffers
authorEli Zaretskii <eliz@gnu.org>
Sat, 27 Jan 2024 08:52:47 +0000 (10:52 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 31 Jan 2024 20:07:36 +0000 (21:07 +0100)
* lisp/textmodes/refill.el (refill-fill-paragraph-at): Use
'fill-forward-paragraph' instead of 'forward/backward-paragraph',
so that modes could customize the behavior.  (Bug#68418)

(cherry picked from commit 8163e0b20c97a8394225a7165a8ab361af09ec29)

lisp/textmodes/refill.el

index bb6b6ebda0f76a3082be37a1987e3c38e8a8a0d4..244c96b60df86a53c4f37064851d6e247f0d3f15 100644 (file)
@@ -106,10 +106,10 @@ This is used to optimize refilling.")
     ;; FIXME: forward-paragraph seems to disregard `use-hard-newlines',
     ;; leading to excessive refilling and wrong choice of fill-prefix.
     ;; might be a bug in my paragraphs.el.
-    (forward-paragraph)
+    (fill-forward-paragraph)
     (skip-syntax-backward "-")
     (let ((end (point))
-         (beg (progn (backward-paragraph) (point)))
+         (beg (progn (fill-forward-paragraph -1) (point)))
          (obeg (overlay-start refill-ignorable-overlay))
          (oend (overlay-end refill-ignorable-overlay)))
       (unless (> beg pos)      ;Don't fill if point is outside the paragraph.