diff options
author | Pierre Courtieu <courtieu@lri.fr> | 2008-01-28 14:36:16 +0000 |
---|---|---|
committer | Pierre Courtieu <courtieu@lri.fr> | 2008-01-28 14:36:16 +0000 |
commit | c6408720e79c5e7e6240e4504ab17a39ed926050 (patch) | |
tree | 74150c45bc041821301010f1765dfa45815202d8 /coq/coq-indent.el | |
parent | c33a4b28e1320fe604b8530f3ac0d8b0b0b550d6 (diff) |
Fixed indentation and goal display.
Diffstat (limited to 'coq/coq-indent.el')
-rw-r--r-- | coq/coq-indent.el | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/coq/coq-indent.el b/coq/coq-indent.el index baa46836..6bd41349 100644 --- a/coq/coq-indent.el +++ b/coq/coq-indent.el @@ -111,16 +111,17 @@ Return nil if not found." (defun coq-skip-until-one-comment-backward () "Skips comments and normal text until finding an unclosed comment start. Return nil if not found. Point is moved to the the unclosed comment start -if found, to (point-max) otherwise." - (ignore-errors (backward-char 1)) ; if point is between '(' and '*' - (if (looking-at coq-comment-start-regexp) t - (forward-char 1) - (let ((nbopen 1) (kind nil)) - (while (and (> nbopen 0) (setq kind (coq-search-comment-delimiter-backward))) - (if (< kind 0) - (setq nbopen (+ 1 nbopen)) - (setq nbopen (- nbopen 1)))) - (= nbopen 0)))) +if found, to (point-max) otherwise. return true if found, nil otherwise." + (if (= (point) (point-min)) nil + (ignore-errors (backward-char 1)) ; if point is between '(' and '*' + (if (looking-at coq-comment-start-regexp) t + (forward-char 1) + (let ((nbopen 1) (kind nil)) + (while (and (> nbopen 0) (setq kind (coq-search-comment-delimiter-backward))) + (if (< kind 0) + (setq nbopen (+ 1 nbopen)) + (setq nbopen (- nbopen 1)))) + (= nbopen 0))))) (defun coq-skip-until-one-comment-forward () "Skips comments and normal text until finding an unopened comment end." |