aboutsummaryrefslogtreecommitdiff
path: root/sx-question-print.el
diff options
context:
space:
mode:
authorArtur Malabarba <am12548@it055607.users.bris.ac.uk>2015-03-04 15:27:25 +0000
committerArtur Malabarba <am12548@it055607.users.bris.ac.uk>2015-03-04 15:27:25 +0000
commit809cbbbfcd21d289dff241d91af66edaf4e9fc1a (patch)
tree581fa898caef39a75921d0b040de82f5bdbc6a29 /sx-question-print.el
parent31b051e52950aa57c025f13650d4af430b6ef343 (diff)
Hotfix question printing.
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 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'."