From: Magnus H. <leg...@us...> - 2008-11-01 11:58:30
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv3365 Modified Files: jabber-chatbuffer.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-614 Creator: Magnus Henoch <ma...@fr...> Don't fill lines we are not supposed to fill In jabber-chat-buffer-fill-long-lines, move the save-restriction inwards. Index: jabber-chatbuffer.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-chatbuffer.el,v retrieving revision 2.15 retrieving revision 2.16 diff -u -d -r2.15 -r2.16 --- jabber-chatbuffer.el 17 Jun 2008 14:51:41 -0000 2.15 +++ jabber-chatbuffer.el 1 Nov 2008 11:58:19 -0000 2.16 @@ -119,19 +119,18 @@ (save-excursion (let ((inhibit-read-only t) (width (window-width (get-buffer-window (current-buffer))))) - (save-restriction - (goto-char (point-min)) - (let ((adaptive-fill-mode nil)) ;Why? -sm - (while (not (eobp)) - (end-of-line) - (when (>= (current-column) (min fill-column width)) + (goto-char (point-min)) + (let ((adaptive-fill-mode nil)) ;Why? -sm + (while (not (eobp)) + (end-of-line) + (when (>= (current-column) (min fill-column width)) + (save-restriction (narrow-to-region (min (1+ (point)) (point-max)) (point-at-bol)) - (let ((goback (point-marker))) - (fill-paragraph nil) - (goto-char (marker-position goback))) - (widen)) - (forward-line 1))))))) + (let ((goback (point-marker))) + (fill-paragraph nil) + (goto-char (marker-position goback))))) + (forward-line 1)))))) (provide 'jabber-chatbuffer) ;; arch-tag: 917e5b60-5894-4c49-b3bc-12e1f97ffdc6 |