# HG changeset patch # User Martin Rudalics # Date 1200500580 0 # Node ID 69b6b74891ef78bc87c643f8831203b0264ca96f # Parent 299387a1f3052fc9cf91a14d0d7e7a6d311d7a37 (longlines-mode, longlines-show-region) (longlines-unshow-hard-newlines): Bind buffer-file-name and buffer-file-truename to nil while modifying buffer. diff -r 299387a1f305 -r 69b6b74891ef lisp/longlines.el --- a/lisp/longlines.el Wed Jan 16 16:22:29 2008 +0000 +++ b/lisp/longlines.el Wed Jan 16 16:23:00 2008 +0000 @@ -136,7 +136,8 @@ (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 @@ (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 @@ (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 @@ (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)))