1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-25 10:47:00 +00:00

(longlines-wrap-line): Reorder wrapping to "insert

new character, then delete" in order to preserve markers.
This commit is contained in:
David Kastrup 2005-11-25 11:06:30 +00:00
parent d973cf9cdb
commit e5ad37ee8d
2 changed files with 15 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2005-11-25 David Kastrup <dak@gnu.org>
* longlines.el (longlines-wrap-line): Reorder wrapping to "insert
new character, then delete" in order to preserve markers.
2005-11-25 David Ponce <david@dponce.com>
* recentf.el (recentf-arrange-by-rule): Handle a special

View File

@ -246,17 +246,21 @@ not need to be wrapped, move point to the next line and return t."
nil)
(if (longlines-merge-lines-p)
(progn (end-of-line)
(delete-char 1)
;; After certain commands (e.g. kill-line), there may be two
;; successive soft newlines in the buffer. In this case, we
;; replace these two newlines by a single space. Unfortunately,
;; this breaks the conservation of (spaces + newlines), so we
;; have to fiddle with longlines-wrap-point.
(if (or (bolp) (eolp))
(if (> longlines-wrap-point (point))
(setq longlines-wrap-point
(1- longlines-wrap-point)))
(insert-char ? 1))
(if (or (prog1 (bolp) (forward-char 1)) (eolp))
(progn
(delete-char -1)
(if (> longlines-wrap-point (point))
(setq longlines-wrap-point
(1- longlines-wrap-point))))
(insert-before-markers-and-inherit ?\ )
(backward-char 1)
(delete-char -1)
(forward-char 1))
nil)
(forward-line 1)
t)))