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/isar-syntax.el | |
parent | f001944403b21758db9ce2614202b86d0813273f (diff) |
Fix for matching names in regexps, restores behaviour of name-aware code such as imenu.
Diffstat (limited to 'isar/isar-syntax.el')
-rw-r--r-- | isar/isar-syntax.el | 8 |
1 files changed, 7 insertions, 1 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) |