[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ask etags to stop language auto-detection from falling back to Fortr

From: Eli Zaretskii
Subject: Re: Ask etags to stop language auto-detection from falling back to Fortran and C?
Date: Fri, 12 Jan 2018 10:16:24 +0200

> Cc: address@hidden
> From: Dmitry Gutov <address@hidden>
> Date: Fri, 12 Jan 2018 00:49:36 +0300
> On 1/11/18 7:41 PM, Eli Zaretskii wrote:
> > There is already such an option: --language=none.  If you have both
> > files that you do want etags to parse for some language and files that
> > you don't,
> I want etags to detect the language, but without the ridiculous 
> fallback.

I don't understand: if the file's language can be detected by means
known to etags, then it will never get to the fallbacks.  It will only
try the fallbacks if all the means to detect the language failed.  So
what do you mean by "detect, but without the fallbacks"?

> > then either put all the latter at the end of the list and
> > precede them with --language=none, or wrap each such file name with
> > "--language=none FILE --language=auto".  This works because --language
> > takes effect on files specified after it.
> Won't "--language=none" stop it detecting the language based on file 
> extension and the sharp-bang declaration?

It will, for the files following --language=none on the command line
(but not for those that come before this switch).  But if the
extension and/or sharp-bang are in the file, the detection should not
have failed, and the fallbacks would not have been attempted.  So I
feel I'm missing something in your use case, because I don't
understand why you think --language=none is not what you want.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]