> Please use "subsystem: short description" in the subject. For example: > > userdiff: support Elixir > > would be sufficient in this case. Ok, will fix. > Please add your sign-off before the three-dash line so that we know that > you are entitled to publish this patch. See Documentation/SubmittingPatches. Yeah, I have seen it too late to fix. Will do. > It would be enlightening to know what Elixir is. (I haven't googled it, > yet.) It is language with Ruby-like syntax for BEAM (Erlang virtual machine). https://elixir-lang.org > If it were a popular language, I think I would have heard about > it. But it may well be possible that I have lived under a rock for too > long... ;) It is quite popular among few services (Pinterest, Discord, Bleacher Report), but it is still pretty new, and still need to get a little more spotlight. > This list is sorted, basically, but your addition perturbates the order. Oh, sorry, I missed dts. > The default hunk header pattern picks up lines that begin with a letter > without leading whitespace. The tests that you present here do not show > that the language specific hunk header pattern is better. The default > would have picked up the correct lines. And, in fact, when I remove the > pattern from the code, these tests still pass! > > I'm not saying that the pattern is bad; I say that the tests do not show > its worthiness. More tests are needed. For example: > > --- 8< --- > defmodule RIGHT do > end > # > # > # ChangeMe; do not pick up 'end' line > --- 8< — Yeah, I will provide such > BTW, I guess that any def, defmodule, etc. as the first word on a line > in the docstring would be picked up incorrectly. Is that a problem? No, as this would (almost?) always be the definition of the module/function, so it is not a problem at all. >> + "|:'a-zA-Z0-9@_]+'" > > The opening bracket is missing here. Whoops. > Would it be an option to collapse all but the first pattern (because I > do not want to start the pattern with an optional part) to > > "[:@]['\"]?[a-zA-Z0-9@_]" > > This assumes that @"x1 and @'y2 cannot occur in a syntactically valid > program. No, these aren’t valid. > Remember: the patterns can be loose; they do not have to > validate the input, but can assume that it is syntactically valid. Ok > Does the language not have any two-character operators, such as '<=‚? It has, I should add them as well (it even has 3 letter operators). -- Łukasz Niemier lukasz@xxxxxxxxxx