emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r107958: Fix require-final-newline in


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107958: Fix require-final-newline interaction with read-only buffers.
Date: Wed, 18 Apr 2012 14:24:13 +0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107958
fixes bug(s): http://debbugs.gnu.org/11156
author: Christopher Schmidt <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Wed 2012-04-18 14:24:13 +0800
message:
  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.
modified:
  lisp/ChangeLog
  lisp/files.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-04-17 23:23:20 +0000
+++ b/lisp/ChangeLog    2012-04-18 06:24:13 +0000
@@ -1,3 +1,8 @@
+2012-04-18  Christopher Schmidt  <address@hidden>
+
+       * 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  <address@hidden>
 
        * 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  <address@hidden>

=== modified file 'lisp/files.el'
--- a/lisp/files.el     2012-04-14 01:46:06 +0000
+++ b/lisp/files.el     2012-04-18 06:24:13 +0000
@@ -2152,6 +2152,7 @@
         (/= (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")))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]