From: Alex Schroeder Date: Wed, 7 Jul 2021 21:26:46 +0000 (+0200) Subject: Revert "Remove an unused local variable" X-Git-Tag: bookmarks~1 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=elpher.git;a=commitdiff_plain;h=b3364328aec2d3164ce30ff65a0ddce3e698a281 Revert "Remove an unused local variable" This reverts commit 914f190a3d33214d43d0d1014e65ae022460299b. fill-prefix is required for adaptive-fill-mode to work correctly when filling list items that are more than one line. --- diff --git a/elpher.el b/elpher.el index 50637b0..3e71cae 100644 --- a/elpher.el +++ b/elpher.el @@ -1497,7 +1497,12 @@ width defined by `elpher-gemini-max-fill-width'." (propertize text-line 'face 'elpher-gemini-quoted)) (t text-line)) text-line)) - (adaptive-fill-mode t)) + (adaptive-fill-mode t) + ;; fill-prefix is important for adaptive-fill-mode: without + ;; it, multi-line list items are not indented correct + (fill-prefix (if (match-string 2 text-line) + (replace-regexp-in-string "[>\*]" " " (match-string 0 text-line)) + nil))) (insert (elpher-process-text-for-display processed-text-line)) (newline)))