> "Stephen" == Stephen J Turnbull
<stephen(a)xemacs.org> writes:
Uwe Brauer writes:
> Is there a way configure the modline such that not only the coding
> system is displayed but also the line ending convention?
As far as I know the default is to do so, as long as Mule is
configured. Unix convention files have no indicator, Windows
convention files get ":T" appended to the coding system, and old Mac
convention files get ":t" appended.
(progn
(with-temp-buffer
(insert "This file is MS-DOS.\r\nAnother line.\r\n")
(write-region (point-min) (point-max) "/tmp/test" nil nil nil
'binary))
(find-file "/tmp/test"))
(progn
(with-temp-buffer
(insert "This file is Mac.\rAnother line.\r")
(write-region (point-min) (point-max) "/tmp/test" nil nil nil
'binary))
(find-file "/tmp/test"))
Thanks!
Ok confirmed (but I also use 21.5.32 Mule)
BTW I don't understand: the write command is identical, so
just the (insert "\r") makes the difference?
However, I thought for example of the following
- I enter a file and see UTF8:T I chose UTF8-unix
(set-buffer-file-coding-system 'utf-8-unix nil) save the file and
the T disappears. Now
I switch back to (set-buffer-file-coding-system 'utf-8-dos nil)
save the file,
but *no* T appears.
- I have a file with utf-8-unix, I close the file and run
unix2dos a script provided by my Kubuntu version and open the
file, *no* T appears, even worse the file has ^M symbols all
over. I presume you are going to tell me that this is a fault of
the script. Hm I downloaded a different one called todos, fromdos
and this seems to work fine! Strange
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta