aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2005-10-25 23:24:47 +0000
committerChong Yidong2005-10-25 23:24:47 +0000
commite7b382ed4b4dbf2c1984a15bf9ea321b3466029f (patch)
treedfe8179f8eb36db5c626b1a86263818cd56a244f
parentde66e883e0cd665e0558b84f11db91d3dacba17f (diff)
downloademacs-e7b382ed4b4dbf2c1984a15bf9ea321b3466029f.tar.gz
emacs-e7b382ed4b4dbf2c1984a15bf9ea321b3466029f.zip
* longlines.el (longlines-mode): Remove narrowing before
performing the initial decoding or final encoding.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/longlines.el8
2 files changed, 11 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a86df0364cf..811196be0f2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12005-10-25 Chong Yidong <cyd@stupidchicken.com>
2
3 * longlines.el (longlines-mode): Remove narrowing before
4 performing the initial decoding or final encoding.
5
12005-10-25 Romain Francoise <romain@orebokech.com> 62005-10-25 Romain Francoise <romain@orebokech.com>
2 7
3 * emacs-lisp/find-func.el (find-library-name): Also strip 8 * emacs-lisp/find-func.el (find-library-name): Also strip
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."
123 ;; Turning off undo is OK since (spaces + newlines) is 123 ;; Turning off undo is OK since (spaces + newlines) is
124 ;; conserved, except for a corner case in 124 ;; conserved, except for a corner case in
125 ;; longlines-wrap-lines that we'll never encounter from here 125 ;; longlines-wrap-lines that we'll never encounter from here
126 (longlines-decode-region (point-min) (point-max)) 126 (save-restriction
127 (widen)
128 (longlines-decode-region (point-min) (point-max)))
127 (longlines-wrap-region (point-min) (point-max)) 129 (longlines-wrap-region (point-min) (point-max))
128 (set-buffer-modified-p mod)) 130 (set-buffer-modified-p mod))
129 (when (and longlines-show-hard-newlines 131 (when (and longlines-show-hard-newlines
@@ -141,7 +143,9 @@ are indicated with a symbol."
141 (longlines-unshow-hard-newlines)) 143 (longlines-unshow-hard-newlines))
142 (let ((buffer-undo-list t) 144 (let ((buffer-undo-list t)
143 (inhibit-read-only t)) 145 (inhibit-read-only t))
144 (longlines-encode-region (point-min) (point-max))) 146 (save-restriction
147 (widen)
148 (longlines-encode-region (point-min) (point-max))))
145 (remove-hook 'change-major-mode-hook 'longlines-mode-off t) 149 (remove-hook 'change-major-mode-hook 'longlines-mode-off t)
146 (remove-hook 'before-kill-functions 'longlines-encode-region t) 150 (remove-hook 'before-kill-functions 'longlines-encode-region t)
147 (remove-hook 'after-change-functions 'longlines-after-change-function t) 151 (remove-hook 'after-change-functions 'longlines-after-change-function t)