From 40490e74566f4fb5e8a5c1dda54ace70aa959c71 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Tue, 24 Aug 2010 11:47:12 +0000 Subject: coq-comment-at-point: avoid error if command start not found (see Trac #342) --- coq/coq-indent.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coq/coq-indent.el') 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. -- cgit v1.2.3