diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/cedet/semantic/wisent/grammar.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/cedet/semantic/wisent/grammar.el b/lisp/cedet/semantic/wisent/grammar.el index 5ca22bac86c..a4104e333d3 100644 --- a/lisp/cedet/semantic/wisent/grammar.el +++ b/lisp/cedet/semantic/wisent/grammar.el @@ -284,13 +284,15 @@ Return the expanded expression." (assocs (wisent-grammar-assocs))) (cons terminals (cons assocs nonterminals)))) -(defun wisent-grammar-parsetable-builder () +(define-mode-local-override semantic-grammar-parsetable-builder + wisent-grammar-mode () "Return the value of the parser table." `(wisent-compiled-grammar ,(wisent-grammar-grammar) ,(semantic-grammar-start))) -(defun wisent-grammar-setupcode-builder () +(define-mode-local-override semantic-grammar-setupcode-builder + wisent-grammar-mode () "Return the parser setup code." (format "(semantic-install-function-overrides\n\ @@ -322,10 +324,7 @@ Menu items are appended to the common grammar menu.") (define-derived-mode wisent-grammar-mode semantic-grammar-mode "WY" "Major mode for editing Wisent grammars." (semantic-grammar-setup-menu wisent-grammar-menu) - (setq-local semantic-grammar-require-form '(require 'semantic/wisent)) - (semantic-install-function-overrides - '((semantic-grammar-parsetable-builder . wisent-grammar-parsetable-builder) - (semantic-grammar-setupcode-builder . wisent-grammar-setupcode-builder)))) + (setq-local semantic-grammar-require-form '(require 'semantic/wisent))) (defvar-mode-local wisent-grammar-mode semantic-grammar-macros '( |