aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Pierre Courtieu <courtieu@lri.fr>2013-07-08 10:01:38 +0000
committerGravatar Pierre Courtieu <courtieu@lri.fr>2013-07-08 10:01:38 +0000
commit60f4c20ee80f138f287aba7b252c5eb71c2bfd1b (patch)
tree272fc6453d90ff7e9be4846eea4994b519c0cce8
parent01e99e72aacce3cd833cd2c484dd86e9b8e9223d (diff)
Fixing again bug #466. With a bbetter solution.
Not using "b o f" token anymore.
-rw-r--r--coq/coq-smie-lexer.el15
-rw-r--r--coq/coq.el2
2 files changed, 4 insertions, 13 deletions
diff --git a/coq/coq-smie-lexer.el b/coq/coq-smie-lexer.el
index cf9c9878..9cd69c98 100644
--- a/coq/coq-smie-lexer.el
+++ b/coq/coq-smie-lexer.el
@@ -566,8 +566,6 @@ The point should be at the beginning of the command name."
((coq-dot-friend-p tok) ".")
- ((and (equal tok "") (eq (point) (point-min))) "b o f")
-
(tok))))
@@ -642,15 +640,7 @@ Lemma foo: forall n,
(moduledecl) (moduledef) (mutual) (exp))
- ;; unknown tokens make smie fallback to backward-sexp, which
- ;; behaves badly on ill-formed comments. Generally we always
- ;; find a known token except when reaching the top of the
- ;; file. Therefore we need to have the "beginning of file"
- ;; token ("b o f") somewhere to avoid falling back on
- ;; backward-sexp. This is the reasonable place probably. The
- ;; best would be that smiefallback ignore comments.
- (commands ("b o f" commands)
- (commands "." commands)
+ (commands (commands "." commands)
(commands "- bullet" commands)
(commands "+ bullet" commands)
(commands "* bullet" commands)
@@ -661,8 +651,7 @@ Lemma foo: forall n,
;; each line orders tokens by increasing priority
;; | C x => fun a => b | C2 x => ...
;;'((assoc "=>") (assoc "|") (assoc "|-" "=> fun")) ; (assoc ", quantif")
- '((assoc "b o f") ;; beginning of file
- (assoc "- bullet") (assoc "+ bullet") (assoc "* bullet") (assoc "."))
+ '((assoc "- bullet") (assoc "+ bullet") (assoc "* bullet") (assoc "."))
'((assoc "with inductive")
(assoc ":= def" ":= inductive") (assoc ":=") (assoc "|") (assoc "=>")
(assoc "xxx provedby")
diff --git a/coq/coq.el b/coq/coq.el
index 095fc156..56f5ae55 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -1148,6 +1148,8 @@ and `use-project-file' to disable this feature."
(defun coq-mode-config ()
+ ; smie needs this
+ (set (make-local-variable 'parse-sexp-ignore-comments) t)
;; Coq error messages are thrown off by TAB chars.
(set (make-local-variable 'indent-tabs-mode) nil)
;; Coq defninition never start by a parenthesis