From: Stefan Monnier Date: Sun, 22 May 2022 15:13:27 +0000 (-0400) Subject: cedet/texi.el: prefer `define-mode-local-override` X-Git-Tag: emacs-29.0.90~1910^2~519 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f166e2dfc07aa9b297537eff79e9951131125fba;p=emacs.git cedet/texi.el: prefer `define-mode-local-override` * lisp/cedet/semantic/texi.el (semantic-parse-region) (semantic-parse-changes): Override with `define-mode-local-override`. (semantic-default-texi-setup): Don't override them with `semantic-install-function-overrides`. --- diff --git a/lisp/cedet/semantic/texi.el b/lisp/cedet/semantic/texi.el index 1917bcb40a6..9b8dfef5f36 100644 --- a/lisp/cedet/semantic/texi.el +++ b/lisp/cedet/semantic/texi.el @@ -55,7 +55,7 @@ The field position is the field number (based at 1) where the name of this section is.") ;;; Code: -(defun semantic-texi-parse-region (&rest _ignore) +(define-mode-local-override semantic-parse-region texinfo-mode (&rest _ignore) "Parse the current texinfo buffer for semantic tags. IGNORE any arguments, always parse the whole buffer. Each tag returned is of the form: @@ -68,7 +68,7 @@ function `semantic-install-function-overrides'." (mapcar #'semantic-texi-expand-tag (semantic-texi-parse-headings))) -(defun semantic-texi-parse-changes () +(define-mode-local-override semantic-parse-changes texinfo-mode () "Parse changes in the current texinfo buffer." ;; NOTE: For now, just schedule a full reparse. ;; To be implemented later. @@ -445,9 +445,6 @@ that start with that symbol." (defun semantic-default-texi-setup () "Set up a buffer for parsing of Texinfo files." ;; This will use our parser. - (semantic-install-function-overrides - '((semantic-parse-region . semantic-texi-parse-region) - (semantic-parse-changes . semantic-texi-parse-changes))) (setq semantic-parser-name "TEXI" ;; Setup a dummy parser table to enable parsing! semantic--parse-table t