>> Have you tried the :language-id _keyword_ as explained in the documentation I linked to? It should avoid the multiple entries.
> I had to look at the source code for some examples to see what you mean. Sure, that would avoid multiple entries.
> can be either a symbol of an Emacs major mode or
> a list of the form (mode :language-id id), with mode being a major-mode symbol
> and id a string that identifies the language to the server
Would be enough. It's very typical of Emacs variables to have these kinds of things.
But feel free to propose some better documentation. Maybe an example.
> Still, it's unclear to me why one would prefer a solution that requires dabbling into language ids where it could be avoided.
The problem you're trying to solve is related to language-id, as far as I understand.
The "wrong" one is being sent right now, and you want the correct one to be sent.
So it's not a question of dabbling, it's about sending the correct value. And there's a
setting for affecting precisely that value, with no middle man, and it was designed
for solving exactly your problem. Guessing the language-id from the major-mode
name is much worse than that, IMHO.