I went back to mode-local to remind myself about it. One of the things it
handled was derived modes.
The `derived-mode` specializer I used in the patch for the &context part
correctly handles derived modes, as the name suggests. It doesn't pay
attention to mode-local's `mode-local-parent` property, of course, only
to the `derived-mode-parent` property.
[ BTW: I'd like to remove the `mode-local-parent` property.
AFAICT it's only ever set by set-mode-local-parent which is only used by
define-child-mode which is used as follows:
bovine/c.el:(define-child-mode c++-mode c-mode
bovine/el.el:(define-child-mode lisp-mode emacs-lisp-mode
html.el:(define-child-mode html-helper-mode html-mode
wisent/javascript.el:(define-child-mode js-mode javascript-mode)
wisent/javascript.el:(define-child-mode js-mode javascript-mode)
wisent/python.el:(define-child-mode python-2-mode python-mode "Python 2
mode")
wisent/python.el:(define-child-mode python-3-mode python-mode "Python 3
mode")
I suspect these could be replaced with other things. WDYT? ]
Also in your patch is a TODO about `with-mode-local'. That with-mode-local
did more than just allow the next method call to dispatch correctly. It
also sets up mode local variables, and other mode-local dispatchers for
anything the dispatched call might need. In this case, the completion call
uses lots of other mode local dispatched functions. with-mode-local doesn't
set the major-mode though. Since all of CEDET is presumably still using
mode-local features, you will need both.
Yes. More importantly, I see that additionally to
define-mode-local-override some functions are overloaded on
a buffer-local basis via semantic-install-function-overrides.
This doesn't fit well with the cl-defmethod system. I can probably get
rid of semantic-install-function-overrides, but do you happen to
know if some functions are overloaded on a buffer-local basis from
elsewhere than semantic-install-function-overrides?