Mercurial > emacs
comparison lisp/longlines.el @ 67033:1a383aa3be8a
longlines.el (longlines-wrap-line): Preserve marker positions.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 20 Nov 2005 05:17:27 +0000 |
parents | 9dbc51935e01 |
children | d3b833785ae6 |
comparison
equal
deleted
inserted
replaced
67032:ebf472d3ae22 | 67033:1a383aa3be8a |
---|---|
237 (defun longlines-wrap-line () | 237 (defun longlines-wrap-line () |
238 "If the current line needs to be wrapped, wrap it and return nil. | 238 "If the current line needs to be wrapped, wrap it and return nil. |
239 If wrapping is performed, point remains on the line. If the line does | 239 If wrapping is performed, point remains on the line. If the line does |
240 not need to be wrapped, move point to the next line and return t." | 240 not need to be wrapped, move point to the next line and return t." |
241 (if (longlines-set-breakpoint) | 241 (if (longlines-set-breakpoint) |
242 (progn (backward-char 1) | 242 (progn (insert-before-markers ?\n) |
243 (delete-char 1) | 243 (backward-char 1) |
244 (insert-char ?\n 1) | 244 (delete-char -1) |
245 (forward-char 1) | |
245 nil) | 246 nil) |
246 (if (longlines-merge-lines-p) | 247 (if (longlines-merge-lines-p) |
247 (progn (end-of-line) | 248 (progn (end-of-line) |
248 (delete-char 1) | 249 (delete-char 1) |
249 ;; After certain commands (e.g. kill-line), there may be two | 250 ;; After certain commands (e.g. kill-line), there may be two |