aboutsummaryrefslogtreecommitdiffhomepage
path: root/coq/coq-indent.el
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2010-08-24 11:47:12 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2010-08-24 11:47:12 +0000
commit40490e74566f4fb5e8a5c1dda54ace70aa959c71 (patch)
tree5655bc9648f1f9f29a5f2ea43640e714fc4eedfe /coq/coq-indent.el
parent0373788695340b562d11462baa882baa3612eac9 (diff)
coq-comment-at-point: avoid error if command start not found
(see Trac #342)
Diffstat (limited to 'coq/coq-indent.el')
-rw-r--r--coq/coq-indent.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/coq/coq-indent.el b/coq/coq-indent.el
index 916dbc7e..64a36dc2 100644
--- a/coq/coq-indent.el
+++ b/coq/coq-indent.el
@@ -267,7 +267,7 @@ The point is put exactly before first non comment letter of the command."
(save-excursion
(let ((st (coq-find-real-start)) ; va chercher trop loin?
(nd (or (coq-find-command-end-forward) (- (point-max) 1)))) ; idem?
- (buffer-substring st (+ nd 1)))))
+ (if st (buffer-substring st (+ nd 1))))))
(defun coq-indent-only-spaces-on-line ()
"Non-nil if there only spaces (or nothing) on the current line after point.