diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2010-08-02 20:17:43 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2010-08-02 20:17:43 +0000 |
commit | 123f667b9b8e2c37f13f3fc0f5176863f15dd5c5 (patch) | |
tree | 069d75b38579654ff6431d4b457c060f0d432ee4 /isar | |
parent | f001944403b21758db9ce2614202b86d0813273f (diff) |
Fix for matching names in regexps, restores behaviour of name-aware code such as imenu.
Diffstat (limited to 'isar')
-rw-r--r-- | isar/isar-syntax.el | 8 | ||||
-rw-r--r-- | isar/isar.el | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/isar/isar-syntax.el b/isar/isar-syntax.el index 588af049..e689fa9d 100644 --- a/isar/isar-syntax.el +++ b/isar/isar-syntax.el @@ -513,11 +513,17 @@ matches contents of quotes for quoted identifiers.") isar-keywords-theory-script isar-keywords-theory-goal)) +(defconst isar-entity-regexp + (concat "\\(" (isar-ids-to-regexp isar-keywords-imenu) "\\)")) + (defconst isar-named-entity-regexp - (concat "\\(" (isar-ids-to-regexp isar-keywords-imenu) "\\)" + (concat isar-entity-regexp "\\(?:\\s-*(\\s-*in[^)]+)\\)?" isar-name-regexp "[[:=]" )) +(defconst isar-named-entity-name-match-number + (1+ (regexp-opt-depth isar-entity-regexp))) + (defconst isar-generic-expression (mapcar (lambda (kw) (list (capitalize kw) diff --git a/isar/isar.el b/isar/isar.el index 9d493fb3..479e4c34 100644 --- a/isar/isar.el +++ b/isar/isar.el @@ -112,7 +112,7 @@ See -k option for Isabelle interface script." proof-save-command-regexp isar-save-command-regexp proof-goal-command-regexp isar-goal-command-regexp proof-goal-with-hole-regexp isar-named-entity-regexp - proof-goal-with-hole-result 2 + proof-goal-with-hole-result isar-named-entity-name-match-number proof-save-with-hole-regexp nil proof-script-imenu-generic-expression isar-generic-expression imenu-syntax-alist isar-script-syntax-table-alist |