aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2014-12-18 17:49:29 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2014-12-22 10:46:41 -0200
commita412a1afc1761ca0954b558c9ef317354503032b (patch)
tree534d11bb2fb928e88b4909caa968eb16f974dbf1
parentbd15a562109470f1c412f9c32ef7e9ab10c13ec2 (diff)
Reimplement reference not-filling
-rw-r--r--sx-question-print.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/sx-question-print.el b/sx-question-print.el
index 1b34d2e..04c22fd 100644
--- a/sx-question-print.el
+++ b/sx-question-print.el
@@ -379,6 +379,7 @@ E.g.:
(let ((first-non-blank (point)))
(dolist (it '(sx-question-mode--skip-and-fontify-pre
sx-question-mode--skip-headline
+ sx-question-mode--skip-references
sx-question-mode--skip-comments))
;; If something worked, keep point where it is and return t.
(if (funcall it) (throw 'sx-question-mode-done t)
@@ -454,5 +455,11 @@ font-locking."
;; Returns non-nil.
(forward-line 1)))
+(defun sx-question-mode--skip-references ()
+ "If there's a reference ahead, skip it and return non-nil."
+ (while (looking-at-p (format sx-question-mode--reference-regexp ".+"))
+ ;; Returns non-nil
+ (forward-line 1)))
+
(provide 'sx-question-print)
;;; sx-question-print.el ends here