From 7f6c6253c939a2034b840c279c3e4dca973b263a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 18 Mar 2019 14:57:10 -0400 Subject: [PATCH] * 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. --- src/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.2