summaryrefslogtreecommitdiff
path: root/admin/grammars
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-03-07 01:58:16 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2021-03-07 01:58:16 -0500
commit468bb5ab7f949441f68c4133fcd5292dfbbfd83d (patch)
tree865d0697dc016cda1cfaf7b267fe6ddd7780e55d /admin/grammars
parent856a0a913a1932e1bad8e44d34944ce7504b23ff (diff)
downloademacs-468bb5ab7f949441f68c4133fcd5292dfbbfd83d.tar.gz
* 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/grammars')
-rw-r--r--admin/grammars/grammar.wy10
-rw-r--r--admin/grammars/python.wy3
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:
;;
declaration:
decl
- (eval $1)
+ (eval $1 t)
;
decl:
@@ -206,7 +206,7 @@ put_decl:
put_name_list:
BRACE_BLOCK
- (mapcar 'semantic-tag-name (EXPANDFULL $1 put_names))
+ (mapcar #'semantic-tag-name (EXPANDFULL $1 put_names))
;
put_names:
@@ -226,7 +226,7 @@ put_name:
put_value_list:
BRACE_BLOCK
- (mapcar 'semantic-tag-code-detail (EXPANDFULL $1 put_values))
+ (mapcar #'semantic-tag-code-detail (EXPANDFULL $1 put_values))
;
put_values:
@@ -300,7 +300,7 @@ plist:
use_name_list:
BRACE_BLOCK
- (mapcar 'semantic-tag-name (EXPANDFULL $1 use_names))
+ (mapcar #'semantic-tag-name (EXPANDFULL $1 use_names))
;
use_names:
@@ -356,7 +356,7 @@ nonterminal:
rules:
lifo_rules
- (apply 'nconc (nreverse $1))
+ (apply #'nconc (nreverse $1))
;
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 @@
(tag))
(declare-function semantic-parse-region "semantic"
(start end &optional nonterminal depth returnonerror))
+(defvar wisent-python-EXPANDING-block)
}
%languagemode python-mode
@@ -871,7 +872,7 @@ paren_class_list_opt
paren_class_list
: PAREN_BLOCK
(let ((wisent-python-EXPANDING-block t))
- (mapcar 'semantic-tag-name (EXPANDFULL $1 paren_classes)))
+ (mapcar #'semantic-tag-name (EXPANDFULL $1 paren_classes)))
;
;; parameters: '(' [varargslist] ')'