* files.el (after-find-file): Don't fail on a read-only buffer if
require-final-newline is `visit' or `visit-save'.
Fixes: debbugs:11156
2012-09-07 Chong Yidong <cyd@gnu.org>
+ * files.el (after-find-file): Don't fail on a read-only buffer if
+ require-final-newline is `visit' or `visit-save' (Bug#11156).
+
* subr.el (read-char-choice): Allow quitting via ESC ESC.
* userlock.el (ask-user-about-supersession-threat): Use
(not buffer-read-only)
(save-excursion
(goto-char (point-max))
- (insert "\n")))
+ (ignore-errors (insert "\n"))))
(when (and buffer-read-only
view-read-only
(not (eq (get major-mode 'mode-class) 'special)))