emacs-diffs
[Top][All Lists]
Advanced

[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: Sun, 08 Jul 2007 18:05:53 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      07/07/08 18:05:53

Index: longlines.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/longlines.el,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- longlines.el        4 Jun 2007 20:33:00 -0000       1.35
+++ longlines.el        8 Jul 2007 18:05:53 -0000       1.36
@@ -223,6 +223,7 @@
   "Wrap each successive line, starting with the line before BEG.
 Stop when we reach lines after END that don't need wrapping, or the
 end of the buffer."
+  (let ((mod (buffer-modified-p)))
   (setq longlines-wrap-point (point))
   (goto-char beg)
   (forward-line -1)
@@ -232,7 +233,8 @@
                     (or (eobp)
                         (and (>= (point) end)
                              (longlines-wrap-line))))))
-  (goto-char longlines-wrap-point))
+    (goto-char longlines-wrap-point)
+    (set-buffer-modified-p mod)))
 
 (defun longlines-wrap-line ()
   "If the current line needs to be wrapped, wrap it and return nil.
@@ -372,10 +374,9 @@
                (> (prefix-numeric-value arg) 0)
              (not longlines-auto-wrap)))
   (if arg
-      (let ((mod (buffer-modified-p)))
+      (progn
        (setq longlines-auto-wrap t)
        (longlines-wrap-region (point-min) (point-max))
-       (set-buffer-modified-p mod)
        (message "Auto wrap enabled."))
     (setq longlines-auto-wrap nil)
     (message "Auto wrap disabled.")))
@@ -410,9 +411,7 @@
 This is called by `window-configuration-change-hook'."
   (when (/= fill-column (- (window-width) window-min-width))
     (setq fill-column (- (window-width) window-min-width))
-    (let ((mod (buffer-modified-p)))
-      (longlines-wrap-region (point-min) (point-max))
-      (set-buffer-modified-p mod))))
+    (longlines-wrap-region (point-min) (point-max))))
 
 ;; Isearch
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]