[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ktexteditor-devel
Subject:    Re: [PATCH] Teach katepart to understand emacs' "-*- coding: ... -*-"
From:       "Vladimir V. Perepelitsa" <inthrax () gmail ! com>
Date:       2008-08-29 9:22:53
Message-ID: 200808291322.53771.inthrax () gmail ! com
[Download RAW message or body]

On Thursday 28 August 2008 22:04:15 Dominik Haumann wrote:
> On Thursday 28 August 2008, Vladimir V. Perepelitsa wrote:
> >  void KateDocument::readVariableLine( QString t, bool onlyViewAndRenderer
> > ) {
> >    // simple check first, no regex
> >    // no kate inside, no vars, simple...
> > -  if (t.find("kate") < 0)
> > +  if (t.find("kate") + t.find("-*-") < 0)
> >      return;
>
> -1 + 0 = -1 < 0 -> does not always work ;)
>
> I leave it to cullmann to decide.
>

Oh, really ;)

It should be 
+  if (t.find("kate") < 0 && t.find("-*-") < 0)
or
+  if (t.find("kate") + t.find("-*-") < -1)



-- 
Vladimir Perepelitsa aka Mons Anderson
<inthrax@gmail.com> / #99779956
_______________________________________________
KTextEditor-Devel mailing list
KTextEditor-Devel@kde.org
https://mail.kde.org/mailman/listinfo/ktexteditor-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic