diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-05-22 16:10:58 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-05-22 16:13:17 -0400 |
commit | be0cf9e2995df4d0ff504561afdefba00b49438f (patch) | |
tree | cb2626cd710c10a1d6af3f422045b6156d7379f2 /lisp/cedet/semantic/wisent.el | |
parent | 8c153047e78e078b2001be9cf16ef3bbaa375a39 (diff) | |
download | emacs-be0cf9e2995df4d0ff504561afdefba00b49438f.tar.gz |
mode-local: Revert the deprecation of buffer-local overrides
Obviously, I did not understand how the <foo>--install-parser was invoked.
Revert "mode-local: Deprecate buffer-local overrides"
Revert "semantic-install-function-overrides: Declare obsolete"
Revert "wisent.el: Prefer `define-mode-local-override`"
This reverts commits 91bc24c46768aab4a851c87edaea05c7476ff779,
d2e0d1452b976a51579cf044257326850804c562, and
3294ad44ebcd024b4ada68d00bedca33acc52de6.
Diffstat (limited to 'lisp/cedet/semantic/wisent.el')
-rw-r--r-- | lisp/cedet/semantic/wisent.el | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/lisp/cedet/semantic/wisent.el b/lisp/cedet/semantic/wisent.el index d06028b48f7..55eeef453ea 100644 --- a/lisp/cedet/semantic/wisent.el +++ b/lisp/cedet/semantic/wisent.el @@ -154,25 +154,17 @@ and will be collected in `semantic-lex' form: (SYMBOL START . END)." ;; Maybe the latter is faster because it eliminates a lot of function ;; call. ;; -;; Emacs<29 generated grammars which manually setup `wisent-parse-stream' -;; as a buffer-local overload for `semantic-parse-stream', but we don't -;; need that now that we define a mode-local overload instead. -(define-obsolete-function-alias 'wisent-parse-stream - #'wisent--parse-stream "29.1" - "Recompile your grammars so they don't call `wisent-parse-stream' any more.") -(define-mode-local-override semantic-parse-stream semantic-grammar-mode - (stream goal) - "Parse STREAM using the Wisent LALR parser. -See `wisent--parse-stream'." - (wisent--parse-stream stream goal)) -(defun wisent--parse-stream (stream goal) +(defun wisent-parse-stream (stream goal) "Parse STREAM using the Wisent LALR parser. GOAL is a nonterminal symbol to start parsing at. Return the list (STREAM SEMANTIC-STREAM) where STREAM are those elements of STREAM that have not been used. SEMANTIC-STREAM is the list of semantic tags found. The LALR parser automaton must be available in buffer local variable -`semantic--parse-table'." +`semantic--parse-table'. + +Must be installed by `semantic-install-function-overrides' to override +the standard function `semantic-parse-stream'." (let (wisent-lex-istream wisent-lex-lookahead la-elt cache) ;; IMPLEMENTATION NOTES: @@ -275,7 +267,10 @@ Optional arguments GOAL is a nonterminal symbol to start parsing at, DEPTH is the lexical depth to scan, and RETURNONERROR is a flag to stop parsing on syntax error, when non-nil. The LALR parser automaton must be available in buffer local variable -`semantic--parse-table'." +`semantic--parse-table'. + +Must be installed by `semantic-install-function-overrides' to override +the standard function `semantic-parse-region'." (if (or (< start (point-min)) (> end (point-max)) (< end start)) (error "Invalid bounds [%s %s] passed to `wisent-parse-region'" start end)) |