aboutsummaryrefslogtreecommitdiff
path: root/sx-question-mode.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-04-21 23:41:56 +0100
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-04-21 23:41:56 +0100
commit13123998a42be86d71b018604ad32dfd6537b8c7 (patch)
treea710c77e99e0e08bebebfe7b7b97012d99057b46 /sx-question-mode.el
parentbb27c05ea17b794a180d5562ada721ae8854f3d5 (diff)
sx-question-mode-hide-show-section complains if used incorrectly
Fix #282
Diffstat (limited to 'sx-question-mode.el')
-rw-r--r--sx-question-mode.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/sx-question-mode.el b/sx-question-mode.el
index 6583961..d1732fb 100644
--- a/sx-question-mode.el
+++ b/sx-question-mode.el
@@ -150,6 +150,8 @@ Optional argument _ is for `push-button'."
(let ((ov (or (sx-question-mode--section-overlays-at
(line-end-position))
(sx-question-mode--section-overlays-at (point)))))
+ (unless (overlayp ov)
+ (sx-user-error "Not inside a question or answer"))
(goto-char (overlay-start ov))
(forward-line 0)
(overlay-put