From: Stefan Monnier Date: Mon, 18 Mar 2019 18:57:10 +0000 (-0400) Subject: * src/fileio.c: Don't convert \r to \n just because of C-x $ X-Git-Tag: emacs-27.0.90~3395 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7f6c6253c939a2034b840c279c3e4dca973b263a;p=emacs.git * src/fileio.c: Don't convert \r to \n just because of C-x $ (choose_write_coding_system): Setup the \r to \n conversion only if selective-display is t. --- diff --git a/src/fileio.c b/src/fileio.c index cac8ed0aeef..7b9446c7e12 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4854,7 +4854,7 @@ choose_write_coding_system (Lisp_Object start, Lisp_Object end, Lisp_Object file val = coding_inherit_eol_type (val, eol_parent); setup_coding_system (val, coding); - if (!STRINGP (start) && !NILP (BVAR (current_buffer, selective_display))) + if (!STRINGP (start) && EQ (Qt, BVAR (current_buffer, selective_display))) coding->mode |= CODING_MODE_SELECTIVE_DISPLAY; return val; }