From 809cbbbfcd21d289dff241d91af66edaf4e9fc1a Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Wed, 4 Mar 2015 15:27:25 +0000 Subject: Hotfix question printing. --- sx-question-print.el | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sx-question-print.el b/sx-question-print.el index 634b66d..e872d01 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'." -- cgit v1.2.3