> On Nov 20, 2022, at 2:02 AM, Eli Zaretskii <eliz@gnu.org> wrote: > >> From: Yuan Fu <casouri@gmail.com> >> Date: Sun, 20 Nov 2022 01:19:13 -0800 >> Cc: Dmitry Gutov <dgutov@yandex.ru>, >> emacs-devel@gnu.org, >> monnier@iro.umontreal.ca, >> theo@thornhill.no >> >> >> >>> On Nov 19, 2022, at 11:11 PM, Eli Zaretskii <eliz@gnu.org> wrote: >>> >>>> Date: Sun, 20 Nov 2022 00:03:35 +0200 >>>> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org, >>>> monnier@iro.umontreal.ca, theo@thornhill.no >>>> From: Dmitry Gutov <dgutov@yandex.ru> >>>> >>>> On 19.11.2022 23:49, Yuan Fu wrote: >>>>> Actually, thatâs evidence supporting his preference: js-mode will remain >>>>> to be the native implementation, so inheriting from it is exactly as >>>>> before. Js-ts-mode will install tree-sitter stuff. And js-base-mode >>>>> wouldnât do much. >>>> >>>> But js-base-mode will be used in auto-mode-alist? >>> >>> NO!!! auto-mode-alist should keep using js-mode, as it does today. >>> >>> js-base-mode, if we need it, should just be a vehicle for easy sharing of >>> common stuff between several modes that pertain to the same or similar >>> languages. It should NOT be visible to users, so should not appear in any >>> variables users are likely to customize. >> >> Alright, changing js-mode to ja-native-mode is indeed a bad idea. So this is >> what I did: for eg, js-mode, I created js-ts-mode and js-base-mode. Js-mode >> and js-ts-mode inherits js-base-mode. Auto-mode-alist has javascript-mode >> (thatâs whatâs in the list right now, I didnât change it). >> >> If a user wants to use tree-sitter for javascript, they can add >> (javascript-mode . js-ts-mode) into major-mode-remap-alist. > > Or manually turn on js-ts-mode. Or customize auto-mode-alist to have > js-ts-mode be used in preference to js-mode. Right? Right. > >> If someone wants js-mode and js-ts-mode to share the same configuration, he >> needs to configure js-base-mode. So js-base-mode isnât completely invisible. > > We should not advertise js-base-mode. If people want to share > configurations between two modes, they should do that explicitly via their > own hook function, or via copying the configurations. (And some of the > configurations cannot be shared anyway, because the two modes use different > features for font-lock and indentation.) Right. Yuan
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