> From: Yuan Fu <casouri@gmail.com> > Date: Sat, 19 Nov 2022 13:45:41 -0800 > Cc: monnier@iro.umontreal.ca, > emacs-devel@gnu.org, > theo@thornhill.no > > > > > On Nov 19, 2022, at 9:52 AM, Eli Zaretskii <eliz@gnu.org> wrote: > > > >> From: Yuan Fu <casouri@gmail.com> > >> Date: Sat, 19 Nov 2022 09:17:11 -0800 > >> Cc: Eli Zaretskii <eliz@gnu.org>, > >> emacs-devel@gnu.org, > >> theo@thornhill.no > >> > >> If we are already renaming existing modes (cc-<foo>-mode), why donât we > >> use the generic name <foo>-mode for the virtual parent mode? It would be > >> nicer if the generic mode (<foo>-mode) is an actual mode, with mode hooks, > >> keycaps, etc, rather than simply a dispatch function. > > > > I already said that I prefer not to rename existing modes. Such > > renaming will break too many init files and other Lisp programs. > > I guess we can at least try it for a bit? "Try" in what way? > Because hook, keymaps, etc, should just work, thatâs the point of major mode > inheritance, after all. C-native-mode will run all the setup for c-mode, plus > setup for c-native-mode. Renaming public symbols is BAAAAD! It causes breakage for many users and Lisp programs. It will either cause large-scale renaming of hooks, keymaps, etc., which will break user init files; or it will cause confusion (because a hook for cc-FOO-mode will be called cc-mode-hook and not the expected cc-FOO-mode-hook). And that is just the tip of the iceberg. Why cannot we have the solution we already discussed and agreed upon: . modes that didn't exist before Emacs 29 will require tree-sitter . modes that existed before Emacs 29 will either - offer tree-sitter support as an optional feature, via a minor mode or a defcustom; or - add a completely new major mode with a different name that requires tree-sitter If you need to add a FOO-base-mode to make it easier to share between tree-sitter and non-tree-sitter modes features that are common to both, it's fine with me to add such *-base-modes, but they should not be in any auto-mode alist, and should generally be only an implementation detail mostly hidden from users. What is the problem with the above? I thought we already agreed on that, so how come this issue pops up time and again?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4