diff options
| author | Stefan Monnier | 2021-03-07 01:58:16 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2021-03-07 01:58:16 -0500 |
| commit | 468bb5ab7f949441f68c4133fcd5292dfbbfd83d (patch) | |
| tree | 865d0697dc016cda1cfaf7b267fe6ddd7780e55d /admin | |
| parent | 856a0a913a1932e1bad8e44d34944ce7504b23ff (diff) | |
| download | emacs-468bb5ab7f949441f68c4133fcd5292dfbbfd83d.tar.gz emacs-468bb5ab7f949441f68c4133fcd5292dfbbfd83d.zip | |
* lisp/cedet/semantic/wisent: Use lexical-binding
* lisp/cedet/semantic/wisent/comp.el: lexical-binding.
(wisent-defcontext): Make sure the vars are also dynbound in the files
that `require` us.
(wisent-state-actions, wisent-automaton-lisp-form): Use `obarray-make`.
(wisent--compile-grammar): Rename from `wisent-compile-grammar`.
(wisent-compile-grammar): Redefine as an obsolete function.
(wisent-automaton-lisp-form): Avoid variable `state`.
* lisp/cedet/semantic/grammar.el: Use lexical-binding.
(semantic-grammar-require-form): New var.
(semantic-grammar-header): Use it to provide new element `require-form`.
(semantic-grammar-header-template): Use it.
* lisp/cedet/semantic/wisent.el (wisent-compiled-grammar): New macro.
* lisp/cedet/semantic/wisent/grammar.el (wisent-grammar-parsetable-builder):
Use it in the generated code instead of the `wisent-compile-grammar` function.
(wisent-grammar-mode): Set `semantic-grammar-require-form` so
the generated ELisp files require `semantic/wisent` rather than
`semantic/bovine`.
* lisp/cedet/semantic/wisent/wisent.el: Use lexical-binding.
* lisp/cedet/semantic/wisent/java-tags.el: Use lexical-binding.
* lisp/cedet/semantic/wisent/python.el: Use lexical-binding.
* lisp/cedet/semantic/wisent/javascript.el: Use lexical-binding.
(semantic-ctxt-current-symbol): Remove unused var `symlist`.
* admin/grammars/python.wy (wisent-python-EXPANDING-block):
Declare dynbound var.
* lisp/cedet/semantic/grammar-wy.el: Regenerate.
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/grammars/grammar.wy | 10 | ||||
| -rw-r--r-- | admin/grammars/python.wy | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/admin/grammars/grammar.wy b/admin/grammars/grammar.wy index 054e85bf70d..35fb7e832e9 100644 --- a/admin/grammars/grammar.wy +++ b/admin/grammars/grammar.wy | |||
| @@ -128,7 +128,7 @@ epilogue: | |||
| 128 | ;; | 128 | ;; |
| 129 | declaration: | 129 | declaration: |
| 130 | decl | 130 | decl |
| 131 | (eval $1) | 131 | (eval $1 t) |
| 132 | ; | 132 | ; |
| 133 | 133 | ||
| 134 | decl: | 134 | decl: |
| @@ -206,7 +206,7 @@ put_decl: | |||
| 206 | 206 | ||
| 207 | put_name_list: | 207 | put_name_list: |
| 208 | BRACE_BLOCK | 208 | BRACE_BLOCK |
| 209 | (mapcar 'semantic-tag-name (EXPANDFULL $1 put_names)) | 209 | (mapcar #'semantic-tag-name (EXPANDFULL $1 put_names)) |
| 210 | ; | 210 | ; |
| 211 | 211 | ||
| 212 | put_names: | 212 | put_names: |
| @@ -226,7 +226,7 @@ put_name: | |||
| 226 | 226 | ||
| 227 | put_value_list: | 227 | put_value_list: |
| 228 | BRACE_BLOCK | 228 | BRACE_BLOCK |
| 229 | (mapcar 'semantic-tag-code-detail (EXPANDFULL $1 put_values)) | 229 | (mapcar #'semantic-tag-code-detail (EXPANDFULL $1 put_values)) |
| 230 | ; | 230 | ; |
| 231 | 231 | ||
| 232 | put_values: | 232 | put_values: |
| @@ -300,7 +300,7 @@ plist: | |||
| 300 | 300 | ||
| 301 | use_name_list: | 301 | use_name_list: |
| 302 | BRACE_BLOCK | 302 | BRACE_BLOCK |
| 303 | (mapcar 'semantic-tag-name (EXPANDFULL $1 use_names)) | 303 | (mapcar #'semantic-tag-name (EXPANDFULL $1 use_names)) |
| 304 | ; | 304 | ; |
| 305 | 305 | ||
| 306 | use_names: | 306 | use_names: |
| @@ -356,7 +356,7 @@ nonterminal: | |||
| 356 | 356 | ||
| 357 | rules: | 357 | rules: |
| 358 | lifo_rules | 358 | lifo_rules |
| 359 | (apply 'nconc (nreverse $1)) | 359 | (apply #'nconc (nreverse $1)) |
| 360 | ; | 360 | ; |
| 361 | 361 | ||
| 362 | lifo_rules: | 362 | lifo_rules: |
diff --git a/admin/grammars/python.wy b/admin/grammars/python.wy index 9c8f4ac6a9c..22e85570dc1 100644 --- a/admin/grammars/python.wy +++ b/admin/grammars/python.wy | |||
| @@ -97,6 +97,7 @@ | |||
| 97 | (tag)) | 97 | (tag)) |
| 98 | (declare-function semantic-parse-region "semantic" | 98 | (declare-function semantic-parse-region "semantic" |
| 99 | (start end &optional nonterminal depth returnonerror)) | 99 | (start end &optional nonterminal depth returnonerror)) |
| 100 | (defvar wisent-python-EXPANDING-block) | ||
| 100 | } | 101 | } |
| 101 | 102 | ||
| 102 | %languagemode python-mode | 103 | %languagemode python-mode |
| @@ -871,7 +872,7 @@ paren_class_list_opt | |||
| 871 | paren_class_list | 872 | paren_class_list |
| 872 | : PAREN_BLOCK | 873 | : PAREN_BLOCK |
| 873 | (let ((wisent-python-EXPANDING-block t)) | 874 | (let ((wisent-python-EXPANDING-block t)) |
| 874 | (mapcar 'semantic-tag-name (EXPANDFULL $1 paren_classes))) | 875 | (mapcar #'semantic-tag-name (EXPANDFULL $1 paren_classes))) |
| 875 | ; | 876 | ; |
| 876 | 877 | ||
| 877 | ;; parameters: '(' [varargslist] ')' | 878 | ;; parameters: '(' [varargslist] ')' |