From 425c7aa85c457d39f3941f772198a381b4d61c70 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Fri, 15 Apr 1994 22:39:31 +0000 Subject: [PATCH] (basic-save-buffer): if selective-display is t, file may end in CR instead of LF. --- lisp/files.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/files.el b/lisp/files.el index f36dc409e46..389139b8f8d 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1515,6 +1515,8 @@ the last real save, but optional arg FORCE non-nil means delete anyway." (widen) (and (> (point-max) 1) (/= (char-after (1- (point-max))) ?\n) + (not (and (eq selective-display t) + (= (char-after (1- (point-max))) ?\r))) (or (eq require-final-newline t) (and require-final-newline (y-or-n-p -- 2.39.5