[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109928: Fix handling of require-fina
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109928: Fix handling of require-final-newline in after-find-file. |
Date: |
Fri, 07 Sep 2012 18:53:29 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109928
fixes bug: http://debbugs.gnu.org/11156
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Fri 2012-09-07 18:53:29 +0800
message:
Fix handling of require-final-newline in after-find-file.
* files.el (after-find-file): Don't fail on a read-only buffer if
require-final-newline is `visit' or `visit-save'.
modified:
lisp/ChangeLog
lisp/files.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-09-07 10:19:58 +0000
+++ b/lisp/ChangeLog 2012-09-07 10:53:29 +0000
@@ -1,5 +1,8 @@
2012-09-07 Chong Yidong <address@hidden>
+ * 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
=== modified file 'lisp/files.el'
--- a/lisp/files.el 2012-09-03 08:54:25 +0000
+++ b/lisp/files.el 2012-09-07 10:53:29 +0000
@@ -2145,7 +2145,7 @@
(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)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109928: Fix handling of require-final-newline in after-find-file.,
Chong Yidong <=