aboutsummaryrefslogtreecommitdiffhomepage
path: root/coq/coq-indent.el
diff options
context:
space:
mode:
authorGravatar Pierre Courtieu <courtieu@lri.fr>2011-06-19 23:34:54 +0000
committerGravatar Pierre Courtieu <courtieu@lri.fr>2011-06-19 23:34:54 +0000
commit7ad9ae0c0a161d6c3598b3e357263fba256bdc78 (patch)
tree4e2f8d8f525a68cc53dac0f8f6438cfe7ece443d /coq/coq-indent.el
parent2c80f2c38e3d9bb7e9bf6b7e0b304a87e42a60a0 (diff)
Removed { and } as command terminators for now.
Fixes #412.
Diffstat (limited to 'coq/coq-indent.el')
-rw-r--r--coq/coq-indent.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/coq/coq-indent.el b/coq/coq-indent.el
index 5425003b..84006319 100644
--- a/coq/coq-indent.el
+++ b/coq/coq-indent.el
@@ -92,7 +92,8 @@ detect if they start something or not."
;; ". " and "... " are command endings, ".. " is not, same as in
;; proof-script-command-end-regexp in coq.el
(defconst coq-end-command-regexp
- "\\(?2:[^.]\\|\\.\\.\\)\\(?1:\\.\\)\\(?3:\\s-\\|\\'\\)\\|\\(?1:{\\)\\(?3:[^|]\\)\\|\\(?2:[^|]\\)\\(?1:}\\)"
+; "\\(?2:[^.]\\|\\.\\.\\)\\(?1:\\.\\)\\(?3:\\s-\\|\\'\\)\\|\\(?1:{\\)\\(?3:[^|]\\)\\|\\(?2:[^|]\\)\\(?1:}\\)"
+ "\\(?2:[^.]\\|\\.\\.\\)\\(?1:\\.\\)\\(?3:\\s-\\|\\'\\)"
"Regexp matching end of a command. There are 3 substrings:
* number 1 is the real coq ending string,
* number 2 is the left context matched that is not part of the ending string
@@ -219,17 +220,18 @@ and return nil."
(goto-char (match-beginning 0))
(if (looking-at coq-comment-start-regexp)
(progn (forward-char 2) (coq-skip-until-one-comment-forward))
- (progn (when (and submatch (match-beginning submatch)) (goto-char (match-beginning submatch)))
+ (progn (when (and submatch (match-beginning submatch))
+ (goto-char (match-beginning submatch)))
(setq found t))
)))
(when found (point))))
(defun coq-is-on-ending-context ()
- (cond
+ (cond
((looking-at "}") -1)
- ((save-excursion
- (ignore-errors
+ ((save-excursion
+ (ignore-errors
(forward-char -1) ; always nil, don't use "and"
(looking-at "{\\|\\."))) 1)
(t 0)))