# HG changeset patch # User Richard M. Stallman # Date 871364825 0 # Node ID 860783b225b9b804ba1b0f8c357ae45d3f64b703 # Parent 04175c55c49b9a5bafaf09dd45e44a24bc1788ed (dos-print-region-function): Force EOL conversion to DOS CR-LF pairs. diff -r 04175c55c49b -r 860783b225b9 lisp/dos-fns.el --- a/lisp/dos-fns.el Tue Aug 12 05:30:47 1997 +0000 +++ b/lisp/dos-fns.el Tue Aug 12 05:47:05 1997 +0000 @@ -139,11 +139,14 @@ `dos-printer' \(which see\). Ignores any arguments beyond START and END." - (write-region start end dos-printer t 0) - ;; Make each print-out start on a new page, but don't waste - ;; paper if there was a form-feed at the end of this file. - (if (not (char-equal (char-after (1- end)) ?\C-l)) - (write-region "\f" nil dos-printer t 0))) + ;; DOS printers need the lines to end with CR-LF pairs, so make + ;; sure it always happens that way. + (let ((coding-system-for-write 'undecided-dos)) + (write-region start end dos-printer t 0) + ;; Make each print-out start on a new page, but don't waste + ;; paper if there was a form-feed at the end of this file. + (if (not (char-equal (char-after (1- end)) ?\C-l)) + (write-region "\f" nil dos-printer t 0)))) ;; Set this to nil if you have a port of the `lpr' program and ;; you want to use it for printing. If the default setting is