diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-03-07 19:03:36 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-03-07 19:03:36 -0500 |
commit | 26bfd0cdcf8bdf4569608227c527bebd755ef2e6 (patch) | |
tree | b1ff4c4de4733de3f1d7c43212bc868c931c87c9 /lisp/cedet/semantic/bovine | |
parent | 251dea693a4e5d1c33257ab3402734a8067049ec (diff) |
* lisp/cedet/semantic/bovine.el: Fix recent regression
The conversion to `lexical-binding` introduced a regression because
`bovine/c.el` relied on inspecting the local variable `lse` in one of
its callers.
(semantic-bovinate-stream): Bind `lse` dynamically, because of
`semantic-parse-region-c-mode`.
(semantic-bovinate-nonterminal-check-map): Rename from
`semantic-bovinate-nonterminal-check-obarray` to hold some other kind
of table.
(semantic-bovinate-nonterminal-check): Use a hash-table instead of an obarray.
* lisp/cedet/semantic/bovine/c.el (semantic-parse-region-c-mode):
Declare use of `lse` via dynamic scoping.
* test/lisp/cedet/semantic-utest-c.el
(semantic-test-c-preprocessor-simulation): Re-enable test.
Diffstat (limited to 'lisp/cedet/semantic/bovine')
-rw-r--r-- | lisp/cedet/semantic/bovine/c.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el index 7be55ea9e10..5712f9b6df0 100644 --- a/lisp/cedet/semantic/bovine/c.el +++ b/lisp/cedet/semantic/bovine/c.el @@ -819,7 +819,9 @@ MACRO expansion mode is handled through the nature of Emacs's non-lexical binding of variables. START, END, NONTERMINAL, DEPTH, and RETURNONERRORS are the same as for the parent." - (if (and (boundp 'lse) (or (/= start 1) (/= end (point-max)))) + ;; FIXME: We shouldn't depend on the internals of `semantic-bovinate-stream'. + (with-suppressed-warnings ((lexical lse)) (defvar lse)) + (if (and (boundp 'lse) (or (/= start (point-min)) (/= end (point-max)))) (let* ((last-lexical-token lse) (llt-class (semantic-lex-token-class last-lexical-token)) (llt-fakebits (car (cdr last-lexical-token))) |