From: Chong Yidong Date: Sun, 20 Nov 2005 05:17:27 +0000 (+0000) Subject: longlines.el (longlines-wrap-line): Preserve marker positions. X-Git-Tag: emacs-pretest-22.0.90~5757 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cee723fbf90394a695e87ef9348d2907aa1cac65;p=emacs.git longlines.el (longlines-wrap-line): Preserve marker positions. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 57d6d885534..082c37f3365 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/longlines.el b/lisp/longlines.el index 85358207a2b..93f3daa4ee8 100644 --- a/lisp/longlines.el +++ b/lisp/longlines.el @@ -239,9 +239,10 @@ end of the buffer." 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)