[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 11:04:55
Message-ID: 200808291504.55367.inthrax () gmail ! com
[Download RAW message or body]

On Friday 29 August 2008 10:57:51 Joseph Wenninger wrote:
>
> Are there limitations, where emacs looks for that line? Python uses the
> same way to define the  enoding of source files, but accepts it only in the
> first or the second source line, otherwise it is ignored. If emacs has the
> same limitations, that should be taken into account

I've just checked on emacs 22.1.1
It understands this directive only on the first line, or at the second line, 
if the first line is shebang.

I.e.
#!/usr/bin/perl
# -*- coding: cp1251 -*- 
and 
# -*- coding: cp1251 -*- 
is ok, but
#!/usr/bin/perl

# -*- coding: cp1251 -*- 
doesn't work

I'll look into emacs sources, and send new version of patch, with vim's 
fileencoding included
Also I'll correct the wrong if ;)

> To support more of the relativly popular editors, I'd suggest to add vim
> encoding detection too, it looks something like
> # vim: set fileencoding=<encoding name> :
> (see http://www.python.org/dev/peps/pep-0263/)



-- 
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