[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: revert-buffer and changes in encoding
From: |
Kenichi Handa |
Subject: |
Re: revert-buffer and changes in encoding |
Date: |
Thu, 30 Dec 2004 21:44:50 +0900 (JST) |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3.50 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) |
In article <address@hidden>, Richard Stallman <address@hidden> writes:
> Can you implement this change? Nobody else offered to,
> and I think it's in your area. Please ack when it's done.
> We have had discussions in the past about how revert-buffer
> should deal with encoding. I think this statement, by Stefan,
> is the right thing to do:
> Looks like we should remember whether the current coding-system was
> automatically inferred or whether it was explicitly specified.
> Of course, we need to remember it separatly for the line-ending part
> of the coding-system.
> If the file was originally visited with a specified coding system,
> revert-buffer should keep on using that specified coding system. If
> the file coding system was autodetected before, revert-buffer should
> autodetect it again, and it should set buffer-file-coding-system again
> so that saving the buffer uses the most recent coding system.
> Setting this flag to record whether the coding system was explicitly
> specified is easy to do in Finsert_buffer. It should only set this
> flag when the VISIT argument specifies visiting a file.
> Can someone please implement this, and ack to me?
I've just installed these changes:
(1) Make a new buffer local variable explicit-buffer-file-coding-system.
(2) Set it to coding-system-for-read in after-insert-file-set-coding.
(3) Set it to last-coding-system-used in basic-save-buffer-1
after writing.
(4) In revert-buffer, bind coding-system-for-read of
explicit-buffer-file-coding-system.
---
Ken'ichi HANDA
address@hidden
- Re: revert-buffer and changes in encoding,
Kenichi Handa <=