summaryrefslogtreecommitdiff
path: root/lisp/longlines.el
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2008-01-16 16:23:00 +0000
committerMartin Rudalics <rudalics@gmx.at>2008-01-16 16:23:00 +0000
commit91b53ad5c8b78f8ab8494e3c5b600f29d2305e84 (patch)
tree804608f4c1ab446925093a8373876fd97577b60e /lisp/longlines.el
parent5ae87ed4147af1b70f5a1b2b8ab28a054d8d1048 (diff)
downloademacs-91b53ad5c8b78f8ab8494e3c5b600f29d2305e84.tar.gz
(longlines-mode, longlines-show-region)
(longlines-unshow-hard-newlines): Bind buffer-file-name and buffer-file-truename to nil while modifying buffer.
Diffstat (limited to 'lisp/longlines.el')
-rw-r--r--lisp/longlines.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/longlines.el b/lisp/longlines.el
index 932a70480a1..77176a5db24 100644
--- a/lisp/longlines.el
+++ b/lisp/longlines.el
@@ -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)))