# HG changeset patch # User Chong Yidong # Date 1132463847 0 # Node ID 1a383aa3be8abefe9cb37bd999699a6a9861155b # Parent ebf472d3ae2229924bec94e0597242da0f2432df longlines.el (longlines-wrap-line): Preserve marker positions. diff -r ebf472d3ae22 -r 1a383aa3be8a lisp/ChangeLog --- a/lisp/ChangeLog Sun Nov 20 03:44:35 2005 +0000 +++ b/lisp/ChangeLog Sun Nov 20 05:17:27 2005 +0000 @@ -5,6 +5,7 @@ (longlines-mode): Turn off longlines temporarily when reverting. Add a message-setup-hook. (longlines-decode-buffer): New function. + (longlines-wrap-line): Preserve marker positions. 2005-11-19 Andreas Schwab diff -r ebf472d3ae22 -r 1a383aa3be8a lisp/longlines.el --- a/lisp/longlines.el Sun Nov 20 03:44:35 2005 +0000 +++ b/lisp/longlines.el Sun Nov 20 05:17:27 2005 +0000 @@ -239,9 +239,10 @@ If wrapping is performed, point remains on the line. If the line does not need to be wrapped, move point to the next line and return t." (if (longlines-set-breakpoint) - (progn (backward-char 1) - (delete-char 1) - (insert-char ?\n 1) + (progn (insert-before-markers ?\n) + (backward-char 1) + (delete-char -1) + (forward-char 1) nil) (if (longlines-merge-lines-p) (progn (end-of-line)