emacs-devel
[Top][All Lists]
Advanced

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

Re: po file charset via auto-coding-functions


From: Kenichi Handa
Subject: Re: po file charset via auto-coding-functions
Date: Mon, 24 Oct 2005 10:53:58 +0900
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

In article <address@hidden>, Kevin Ryde <address@hidden> writes:

> Kenichi Handa <address@hidden> writes:
>> 
>>  And, functions in auto-coding-functions is called on any
>>  file, but currently, po-find-file-coding-system is called
>>  only on *.po file.  I'm not sure which is better, but at
>>  least there's a difference.

> I guess if the file contents are unambiguous, or near enough so, then
> it may actually be a good thing to ignore the filename.

In general, I agree.  But, for that, a function to detect a
coding system has to check if the contents is surely in an
expected format in advance.  For instance, in the case of
po-find-file-coding-system, it has to check if the file is
surely PO file.  But, it seems that the current po.el
doesn't do that but expects that it is called only on PO
file.

> Maybe the auto-coding-functions could be called with the filename too,
> so they could restrict themselves if they felt the need.
> find-auto-coding has that available for the calls, or document that
> `filename' is bound, or whatever.

Yes, if a function in auto-coding-functions can check a
filename too, the above problem disappears (or at least
Emacs can perform the same operation as now).  But, I don't
want to change an API at this moment, especially when we can
fix the problem by the other method (as in my previous
mail).

---
Kenichi Handa
address@hidden




reply via email to

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