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-18 17:49:29 -0200
commit2a77336ccbe19acdfd176b7198736a78be887e04 (patch)
tree2bf2c2b81424d66ddb58d46e34221fab79ebe5e6
parentb3008bf4e11bb4a5bc67a82f7bebd3f38520d0af (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 6c98c36..97124e9 100644
--- a/sx-question-print.el
+++ b/sx-question-print.el
@@ -376,6 +376,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)
@@ -451,5 +452,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