diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2010-08-24 11:47:12 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2010-08-24 11:47:12 +0000 |
commit | 40490e74566f4fb5e8a5c1dda54ace70aa959c71 (patch) | |
tree | 5655bc9648f1f9f29a5f2ea43640e714fc4eedfe | |
parent | 0373788695340b562d11462baa882baa3612eac9 (diff) |
coq-comment-at-point: avoid error if command start not found
(see Trac #342)
-rw-r--r-- | coq/coq-indent.el | 2 |
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. |