From cee723fbf90394a695e87ef9348d2907aa1cac65 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 20 Nov 2005 05:17:27 +0000 Subject: [PATCH] longlines.el (longlines-wrap-line): Preserve marker positions. --- lisp/ChangeLog | 1 + lisp/longlines.el | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) 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) -- 2.39.5