summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2000-11-16 17:04:27 +0000
committerGerd Moellmann <gerd@gnu.org>2000-11-16 17:04:27 +0000
commit407b432881cad19029c80f9626cc84e0a9321caa (patch)
tree220052786a2dc621a87a791261960d2606c98a4c
parent046110c6fe051d497f26b5d8375bc17b3b6cc08a (diff)
downloademacs-407b432881cad19029c80f9626cc84e0a9321caa.tar.gz
(basic-save-buffer): Don't add a newline if
find-file-literally is non-nil. (find-file-literally): Extend doc string.
-rw-r--r--lisp/files.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 3fa55ac80ad..e8171d7ef21 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1214,7 +1214,8 @@ Format conversion and character code conversion are both disabled,
and multibyte characters are disabled in the resulting buffer.
The major mode used is Fundamental mode regardless of the file name,
and local variable specifications in the file are ignored.
-Automatic uncompression is also disabled.
+Automatic uncompression and adding a newline at the end of the
+file due to `require-final-newline' is also disabled.
You cannot absolutely rely on this function to result in
visiting the file literally. If Emacs already has a buffer
@@ -2591,6 +2592,7 @@ After saving the buffer, this function runs `after-save-hook'."
(widen)
(save-excursion
(and (> (point-max) 1)
+ (not find-file-literally)
(/= (char-after (1- (point-max))) ?\n)
(not (and (eq selective-display t)
(= (char-after (1- (point-max))) ?\r)))