[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: |
Martin Rudalics |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/longlines.el,v |
Date: |
Fri, 30 Nov 2007 09:00:46 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Martin Rudalics <m061211> 07/11/30 09:00:46
Index: longlines.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/longlines.el,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- longlines.el 29 Oct 2007 18:32:31 -0000 1.40
+++ longlines.el 30 Nov 2007 09:00:46 -0000 1.41
@@ -207,33 +207,39 @@
"Make hard newlines visible by adding a face.
With optional argument ARG, make the hard newlines invisible again."
(interactive "P")
- (let ((buffer-undo-list t)
- (mod (buffer-modified-p)))
(if arg
(longlines-unshow-hard-newlines)
(setq longlines-showing t)
- (longlines-show-region (point-min) (point-max)))
- (set-buffer-modified-p mod)))
+ (longlines-show-region (point-min) (point-max))))
(defun longlines-show-region (beg end)
"Make hard newlines between BEG and END visible."
(let* ((pmin (min beg end))
(pmax (max beg end))
(pos (text-property-not-all pmin pmax 'hard nil))
- (inhibit-read-only t))
+ (mod (buffer-modified-p))
+ (buffer-undo-list t)
+ (inhibit-read-only t)
+ (inhibit-modification-hooks t))
(while pos
(put-text-property pos (1+ pos) 'display
(copy-sequence longlines-show-effect))
- (setq pos (text-property-not-all (1+ pos) pmax 'hard nil)))))
+ (setq pos (text-property-not-all (1+ pos) pmax 'hard nil)))
+ (restore-buffer-modified-p mod)))
(defun longlines-unshow-hard-newlines ()
"Make hard newlines invisible again."
(interactive)
(setq longlines-showing nil)
- (let ((pos (text-property-not-all (point-min) (point-max) 'hard nil)))
+ (let ((pos (text-property-not-all (point-min) (point-max) 'hard nil))
+ (mod (buffer-modified-p))
+ (buffer-undo-list t)
+ (inhibit-read-only t)
+ (inhibit-modification-hooks t))
(while pos
(remove-text-properties pos (1+ pos) '(display))
- (setq pos (text-property-not-all (1+ pos) (point-max) 'hard nil)))))
+ (setq pos (text-property-not-all (1+ pos) (point-max) 'hard nil)))
+ (restore-buffer-modified-p mod)))
;; Wrapping the paragraphs.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/longlines.el,v,
Martin Rudalics <=