diff options
author | Clément Pit-Claudel <cpitclaudel@gmail.com> | 2018-08-21 13:58:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-21 13:58:55 -0400 |
commit | 3b9e1e4742a2dafce6ac2ef4bfa95d22e43c3c59 (patch) | |
tree | 264873e07f4b872ff5fc71eaf53705bee621eddd | |
parent | 5f73b85cfcbb7cf0f39d212ce1d5a540e5b8ba22 (diff) | |
parent | 5c27e4a9398cb366e087594dd1c72e4c084fae01 (diff) |
Merge pull request #379 from tchajed/variant-keyword
Support the Variant vernacular
-rw-r--r-- | coq/coq-smie.el | 2 | ||||
-rw-r--r-- | coq/coq-syntax.el | 1 | ||||
-rwxr-xr-x | coq/coqtags | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/coq/coq-smie.el b/coq/coq-smie.el index 2b5e59e9..59d84e36 100644 --- a/coq/coq-smie.el +++ b/coq/coq-smie.el @@ -505,7 +505,7 @@ The point should be at the beginning of the command name." ":= with" (goto-char p) ":= module"))) - ((member corresp '("Inductive" "CoInductive")) ":= inductive") + ((member corresp '("Inductive" "CoInductive" "Variant")) ":= inductive") ((equal corresp "let") ":= let") ((equal corresp "where") ":= inductive") ;; inductive or fixpoint, nevermind ((or (looking-back "{" nil)) ":= record") diff --git a/coq/coq-syntax.el b/coq/coq-syntax.el index 91ef4083..c55c93fc 100644 --- a/coq/coq-syntax.el +++ b/coq/coq-syntax.el @@ -503,6 +503,7 @@ so for the following reasons: ("Scheme Induction" "sci" "Scheme @{name} := Induction for # Sort #." t) ("Scheme Minimality" "scm" "Scheme @{name} := Minimality for # Sort #." t) ("Structure" "str" "Structure # : # := {\n# : #;\n# : # }" t "Structure") + ("Variant" "varv" "Variant # : # := # : #." t "Variant") ) "Coq definition keywords information list. See `coq-syntax-db' for syntax. " ) diff --git a/coq/coqtags b/coq/coqtags index 50d4a2f5..6a6e5a64 100755 --- a/coq/coqtags +++ b/coq/coqtags @@ -59,10 +59,10 @@ while(<>) elsif($stmt=~/^([ \t]*((Axiom)|(Hypothesis)|(Parameter)|(Variable))\s+[\w\']+)/) { adddecs($stmt,$1); } - elsif($stmt=~/^([ \t]*((Definition)|(Fixpoint)|(Inductive)|(CoInductive)|(Record))\s+([\w\']+))/) + elsif($stmt=~/^([ \t]*((Definition)|(Fixpoint)|(Inductive)|(CoInductive)|(Record)|(Variant))\s+([\w\']+))/) { $tagstring.=$1."\177".$8."\001".$lp.",".$cp."\n"; - if($2 eq "Inductive" || $2 eq "CoInductive"){ + if($2 eq "Inductive" || $2 eq "CoInductive" || $2 eq "Variant"){ add_constructors($stmt); } elsif($2 eq "Record"){ |