]> git.eshelyaron.com Git - emacs.git/commitdiff
* longlines.el (longlines-mode): Remove narrowing before
authorChong Yidong <cyd@stupidchicken.com>
Tue, 25 Oct 2005 23:24:47 +0000 (23:24 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Tue, 25 Oct 2005 23:24:47 +0000 (23:24 +0000)
performing the initial decoding or final encoding.

lisp/ChangeLog
lisp/longlines.el

index a86df0364cf257b3a307cf2c8a3fb7691036bbbf..811196be0f2269092bd48ef80ea168a7f1e867a2 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-25  Chong Yidong  <cyd@stupidchicken.com>
+
+       * longlines.el (longlines-mode): Remove narrowing before
+       performing the initial decoding or final encoding.
+
 2005-10-25  Romain Francoise  <romain@orebokech.com>
 
        * emacs-lisp/find-func.el (find-library-name): Also strip
index 00a2782d0a38ab96391b6a1221296d8a452cbd5e..7f372725b0e6fd2233544167cdade515c54ddb75 100644 (file)
@@ -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)