]> code.delx.au - gnu-emacs/blobdiff - lisp/longlines.el
New file.
[gnu-emacs] / lisp / longlines.el
index 57b5742751f42ebd74ea7d62e9a0b3be23a7cc34..77176a5db243481e87154473b8b9c83474ff3fdd 100644 (file)
@@ -1,6 +1,6 @@
 ;;; longlines.el --- automatically wrap long lines
 
-;; Copyright (C) 2000, 2001, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Authors:    Kai Grossjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 ;;             Alex Schroeder <alex@gnu.org>
@@ -136,7 +136,8 @@ are indicated with a symbol."
         (let ((buffer-undo-list t)
               (inhibit-read-only t)
              (after-change-functions nil)
-              (mod (buffer-modified-p)))
+              (mod (buffer-modified-p))
+             buffer-file-name buffer-file-truename)
           ;; Turning off undo is OK since (spaces + newlines) is
           ;; conserved, except for a corner case in
           ;; longlines-wrap-lines that we'll never encounter from here
@@ -176,7 +177,8 @@ are indicated with a symbol."
         (longlines-unshow-hard-newlines))
     (let ((buffer-undo-list t)
          (after-change-functions nil)
-          (inhibit-read-only t))
+          (inhibit-read-only t)
+         buffer-file-name buffer-file-truename)
       (if longlines-decoded
          (save-restriction
            (widen)
@@ -220,7 +222,8 @@ With optional argument ARG, make the hard newlines invisible again."
         (mod (buffer-modified-p))
         (buffer-undo-list t)
         (inhibit-read-only t)
-        (inhibit-modification-hooks t))
+        (inhibit-modification-hooks t)
+        buffer-file-name buffer-file-truename)
     (while pos
       (put-text-property pos (1+ pos) 'display
                         (copy-sequence longlines-show-effect))
@@ -235,7 +238,8 @@ With optional argument ARG, make the hard newlines invisible again."
        (mod (buffer-modified-p))
        (buffer-undo-list t)
        (inhibit-read-only t)
-       (inhibit-modification-hooks t))
+       (inhibit-modification-hooks t)
+       buffer-file-name buffer-file-truename)
     (while pos
       (remove-text-properties pos (1+ pos) '(display))
       (setq pos (text-property-not-all (1+ pos) (point-max) 'hard nil)))