Commit c09c46b2 authored by Christopher Schmidt's avatar Christopher Schmidt Committed by Chong Yidong
Browse files

Fix require-final-newline interaction with read-only buffers.

* lisp/files.el (after-find-file): Do not try to add a final newline
if the buffer is read-only.

Fixes: debbugs:11156
parent 5f6530ea
2012-04-18 Christopher Schmidt <christopher@ch.ristopher.com>
* files.el (after-find-file): Do not try to add a final newline if
the buffer is read-only (Bug#11156).
2012-04-17 Richard Stallman <rms@gnu.org>
* mail/rmail.el (rmail-start-mail):
......@@ -9,7 +14,7 @@
(rmail-forward): Pass the Rmail buffer, not nil, for replybuffer.
* mail/sendmail.el (mail-bury): Choose the first rmail-mode
buffer, not the last. Reject temp buffers. Use the rmail-mode
buffer, not the last. Reject temp buffers. Use the rmail-mode
buffer, not newbuf.
2012-04-17 Juanma Barranquero <lekktu@gmail.com>
......
......@@ -2152,6 +2152,7 @@ unless NOMODES is non-nil."
(/= (char-after (1- (point-max))) ?\n)
(not (and (eq selective-display t)
(= (char-after (1- (point-max))) ?\r)))
(not buffer-read-only)
(save-excursion
(goto-char (point-max))
(insert "\n")))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment