summaryrefslogtreecommitdiff
path: root/lisp/longlines.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2005-10-25 23:24:47 +0000
committerChong Yidong <cyd@stupidchicken.com>2005-10-25 23:24:47 +0000
commit5fe5cb3f8bbdbf74ed07b8ccd09aeee26cfaf7e7 (patch)
treec1347d8597d78a9e18ecd1d4804d9ff38363770a /lisp/longlines.el
parent4cae87eddbc6960b26a831d154989f214aa20cf3 (diff)
downloademacs-5fe5cb3f8bbdbf74ed07b8ccd09aeee26cfaf7e7.tar.gz
* longlines.el (longlines-mode): Remove narrowing before
performing the initial decoding or final encoding.
Diffstat (limited to 'lisp/longlines.el')
-rw-r--r--lisp/longlines.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/longlines.el b/lisp/longlines.el
index 00a2782d0a3..7f372725b0e 100644
--- a/lisp/longlines.el
+++ b/lisp/longlines.el
@@ -123,7 +123,9 @@ are indicated with a symbol."
;; 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
- (longlines-decode-region (point-min) (point-max))
+ (save-restriction
+ (widen)
+ (longlines-decode-region (point-min) (point-max)))
(longlines-wrap-region (point-min) (point-max))
(set-buffer-modified-p mod))
(when (and longlines-show-hard-newlines
@@ -141,7 +143,9 @@ are indicated with a symbol."
(longlines-unshow-hard-newlines))
(let ((buffer-undo-list t)
(inhibit-read-only t))
- (longlines-encode-region (point-min) (point-max)))
+ (save-restriction
+ (widen)
+ (longlines-encode-region (point-min) (point-max))))
(remove-hook 'change-major-mode-hook 'longlines-mode-off t)
(remove-hook 'before-kill-functions 'longlines-encode-region t)
(remove-hook 'after-change-functions 'longlines-after-change-function t)