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: Richard M. Stallman
Subject: Re: po file charset via auto-coding-functions
Date: Sat, 19 Nov 2005 18:27:06 -0500

    I don't know exactly which command uses it, but it is used
    by any operations that call get-file-buffer.

Most callers of get-file-buffer pass a real file name.  So unless
someone uses a file whose name resembles that of a tar subfile,
get-file-buffer will never return one of these buffers, and I think
that is the correct result.

Thus, looking at my question:

    > Does that file name get used for anything except to appear in the C_x
    > C-b listing and be helpful for the user?  I think it does not.

I think I was right--it is not used for anything else, or at least,
not unless a problem is occurring.

Therefore, we do not want to install any file name handler for this syntax.

    > If it is simply a matter to call find-operation-coding-system here,
    > in tar-extract, then I agree it is ok to pass buffer-file-name.

    Yes, that is what the change I propsed for an archived file
    does.

Ok, please make that change.

    +       (let ((buffer-file-name
    +              (concat file "!"
    +                      (jka-compr-byte-compiler-base-file-name file))))
    + 

Binding buffer-file-name is rather unclean.
And I don't see a reason to do it.

    so that find-operation-coding-system (called in
    decode-coding-inserted-region) can surely find
    po-find-file-coding-system to be called, and it can surely
    find the current buffer by get-file-buffer.

decode-coding-inserted-region passes its FILENAME arg to
find-operation-coding-system.  So all you need to do is to pass
this funny file name to decode-coding-inserted-region.
There is no need to bind buffer-file-name.

Why are you concerned about whether get-file-buffer can be used with
this funny file name?




reply via email to

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