On Thu, Dec 16, 2004 at 08:30:46PM +0100, Agustin Martin Domingo wrote:
> Package: xemacs21
> Version: 21.4.16-1
> Severity: normal

> Hi, playing with coding systems, I have found this problem,
> 
> (set-buffer-file-coding-system 'iso-8859-15-unix)
> (message "%s" buffer-file-coding-system)
> 
> evaluated under xemacs21 gives
> 
>  #<coding_system iso-8859-15-unix>
> 
> while under emacs21 gives the expected
> 
>  iso-8859-15-unix
> 
> The xemacs21 result seems wrong.
> 

More info on this, if buffer-file-coding-system is not explicitely set by
set-buffer-file-coding-system, buffer-file-coding-system seems to behave
well,

$ xemacs 
eval inside it buffer-file-coding-system -> iso-8859-1

as expected, but if in any way I set its value explicitely, either with a
set-buffer-file-coding-system or with a -*- coding: iso-8859-1 -*- heading
line, I get the result (#<coding_system iso-8859-1-unix>).

To make things funnier,

(set-buffer-file-coding-system 'iso-8859-15-unix 'unix)   
(message "%s" buffer-file-coding-system)

gives when evaluated 

iso-8859-15-unix

with no extra stuff, as expected.

The long message comes from src/file-coding.c and seems to the same in
xemacs CVS, although coded slightly differently, so seems intentional, but
then set-buffer-file-coding-system should probably strip the extra stuff
also if no EOL type is given (or if force is 'nil). 

While the use of '#...' is probably intentional and xemacs21 specific, having
things behave differently when buffer-file-coding-system is set differently
seems a bit inconsistent.

Cheers,

-- 
Agustin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to