[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/longlines.el,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/longlines.el,v |
Date: |
Tue, 07 Aug 2007 16:10:21 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 07/08/07 16:10:20
Index: longlines.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/longlines.el,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- longlines.el 26 Jul 2007 05:26:28 -0000 1.37
+++ longlines.el 7 Aug 2007 16:10:20 -0000 1.38
@@ -79,11 +79,13 @@
(defvar longlines-wrap-end nil)
(defvar longlines-wrap-point nil)
(defvar longlines-showing nil)
+(defvar longlines-decoded nil)
(make-variable-buffer-local 'longlines-wrap-beg)
(make-variable-buffer-local 'longlines-wrap-end)
(make-variable-buffer-local 'longlines-wrap-point)
(make-variable-buffer-local 'longlines-showing)
+(make-variable-buffer-local 'longlines-decoded)
;; Mode
@@ -128,7 +130,9 @@
;; longlines-wrap-lines that we'll never encounter from here
(save-restriction
(widen)
+ (unless longlines-decoded
(longlines-decode-buffer)
+ (setq longlines-decoded t))
(longlines-wrap-region (point-min) (point-max)))
(set-buffer-modified-p mod))
(when (and longlines-show-hard-newlines
@@ -161,9 +165,11 @@
(let ((buffer-undo-list t)
(after-change-functions nil)
(inhibit-read-only t))
+ (if longlines-decoded
(save-restriction
(widen)
- (longlines-encode-region (point-min) (point-max))))
+ (longlines-encode-region (point-min) (point-max))
+ (setq longlines-decoded nil))))
(remove-hook 'change-major-mode-hook 'longlines-mode-off t)
(remove-hook 'after-change-functions 'longlines-after-change-function t)
(remove-hook 'post-command-hook 'longlines-post-command-function t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/longlines.el,v,
Chong Yidong <=