[Pkg-mc-devel] Bug#844212: Bug#844212: mc: improved syntax detections for sh, perl, makefile and m4
dr at jones.dk
Sun Nov 13 17:22:46 UTC 2016
Quoting Yury V. Zaytsev (2016-11-13 16:49:13)
> On Sun, 13 Nov 2016, Jonas Smedegaard wrote:
>> Similar patterns likely makes sense to expand to other syntaxes as well.
> In the future, please post such patches directly to the upstream bug
> tracker; they are not Debian-specific, and all you gonna get out of
> posting them to the Debian bug tracker is a few months to a few years
> delay in getting them upstreamed.
Ok - and thanks for your swift response!
I can recommend to add a reportbug hook to warn bugreporters that such
severe bitrot is to be expected.
Should I file a separate wishlist bugreport about that?
>> Attached is a patch for improved syntax detections for sh, perl,
>> makefile and m4.
> I've committed the *.t thing, but your regexes scare the hell out of me.
> I understand that these ones are some kind of editor tags, but I'm not
> sure what they are actually supposed to match:
It is emacs-style hint, with \ and * backtick-escaped:
# -*- Mode: sh; tab-width: 4; indent-tabs-mode: t -*-
# This is a -*- sh -*-
> Besides, the whole composition is somehow weird and inconsistent:
> ^ spaces in shebang?!
Intended: Emacs style commonly contains spaces, (even hashbang style
uncommonly does too, I believe):
> ^ why this is optional?!
Because it is in the wild:
> ^ no parens unlike above?!
> ^ can't be a valid script
Again, that is emacs hint. Only when executable bit is set do the
initial line need to be a hashbang - files included or in other ways
used indirectly need not.
> I'm sorry, but I think this is unfit to be committed.
If not because you made wrong assumptions now clarified, please
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136 Website: http://dr.jones.dk/
[x] quote me freely [ ] ask before reusing [ ] keep private
More information about the Pkg-mc-devel