I had a few free minutes this afternoon (okay, so I *took* a few free
minutes this afternoon), and poked around in the coding system stuff to
see what's up with the LFD/RET problems on TTYs. I found that TTYs get
the 'undecided coding system, and that the 'undecided coding system has
the 'do-eol property, which triggers EOL autodetection. Changing from
'undecided to 'undecided-unix (which does not have the 'do-eol property)
seems to be the right way to go. It looks like this would be a problem
on Windows machines with MULE as well. Can somebody confirm or deny
that?
The patch below seems to fix the problem for me, but as I don't know
this code terribly well, I'd appreciate a few more eyes looking at it.
lisp/ChangeLog addition:
2003-05-08 Jerry James <james(a)xemacs.org>
* code-init.el (coding-system-variable-default-value-table): Use
undecided-unix for keyboards to avoid EOL autodetection.
* code-init.el (coding-system-variable-default-value): Update the
comment to reflect the changed table.
xemacs-21.5 source patch:
Diff command: cvs -q diff -uN
Files affected: lisp/code-init.el
Index: lisp/code-init.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/code-init.el,v
retrieving revision 1.5
diff -d -u -u -r1.5 code-init.el
--- lisp/code-init.el 2003/02/21 06:56:47 1.5
+++ lisp/code-init.el 2003/05/08 22:15:35
@@ -79,7 +79,7 @@
(native
binary binary binary raw-text-dos mswindows-multibyte-system-default-dos)
(keyboard
- binary raw-text undecided raw-text undecided)
+ binary raw-text undecided-unix raw-text undecided-unix)
;; the `terminal' coding system is used for output to stderr. such
;; streams do automatic lf->crlf encoding in the C library, so we need
;; to not do the same translations ourselves.
@@ -158,16 +158,16 @@
The table of default values looks like this: (see below for abbreviations)
- Unix Unix+EOL Unix+Mule MSW MSW+Mule
-------------------------------------------------------------------------------
-bfcs-for-read binary raw-text undecided raw-text undecided
-default bfcs binary binary iso-2022-8 raw-text-dos MSW-MB-dos
-native binary binary binary raw-text-dos MSW-MB-SD-dos
-keyboard binary raw-text undecided raw-text undecided
-terminal binary binary binary binary MSW-MB-unix
-process-read binary raw-text undecided raw-text undecided
-process-write binary binary binary raw-text MSW-MB-SD
-no-conv-cs binary raw-text raw-text raw-text MSW-MB
+ Unix Unix+EOL Unix+Mule MSW MSW+Mule
+-----------------------------------------------------------------------------
+bfcs-for-read binary raw-text undecided raw-text undecided
+default bfcs binary binary iso-2022-8 raw-text-dos MSW-MB-dos
+native binary binary binary raw-text-dos MSW-MB-SD-dos
+keyboard binary raw-text undecided-unix raw-text undecided-unix
+terminal binary binary binary binary MSW-MB-unix
+process-read binary raw-text undecided raw-text undecided
+process-write binary binary binary raw-text MSW-MB-SD
+no-conv-cs binary raw-text raw-text raw-text MSW-MB
VAR can be one of: (abbreviations in parens)
--
Jerry James
http://www.ittc.ku.edu/~james/