aboutsummaryrefslogtreecommitdiff
path: root/sx-question-print.el
diff options
context:
space:
mode:
Diffstat (limited to 'sx-question-print.el')
-rw-r--r--sx-question-print.el28
1 files changed, 14 insertions, 14 deletions
diff --git a/sx-question-print.el b/sx-question-print.el
index 3a8dffc..51c047c 100644
--- a/sx-question-print.el
+++ b/sx-question-print.el
@@ -451,20 +451,20 @@ font-locks code-blocks according to mode."
(adaptive-fill-first-line-regexp "\\`[ \t]*>[ \t]*?\\'")
(adaptive-fill-function #'markdown-adaptive-fill-function))
(save-restriction
- (save-excursion
- (narrow-to-region beg end)
- ;; Compact links.
- (sx-question-mode--process-links-in-buffer)
- (sx-question-mode--process-html-tags (point-min) (point-max))
- ;; And now the filling and other handlings.
- (goto-char (point-min))
- (while (null (eobp))
- ;; Don't fill pre blocks.
- (unless (sx-question-mode--dont-fill-here)
- (let ((beg (point)))
- (skip-chars-forward "\r\n[:blank:]")
- (forward-paragraph)
- (fill-region beg (point)))))))))
+ (narrow-to-region beg end)
+ ;; Compact links.
+ (sx-question-mode--process-links-in-buffer)
+ (sx-question-mode--process-html-tags (point-min) (point-max))
+ ;; And now the filling and other handlings.
+ (goto-char (point-min))
+ (while (null (eobp))
+ ;; Don't fill pre blocks.
+ (unless (sx-question-mode--dont-fill-here)
+ (let ((beg (point)))
+ (skip-chars-forward "\r\n[:blank:]")
+ (forward-paragraph)
+ (fill-region beg (point)))))
+ (goto-char (point-max)))))
(defun sx-question-mode--insert-markdown (text)
"Return TEXT fontified according to `markdown-mode'."