diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/longlines.el | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6c96213a71f..e0b140bc276 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-11-30 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * longlines.el (longlines-wrap-line, longlines-encode-region): | ||
| 4 | Preserve text properties (Bug#1425). | ||
| 5 | |||
| 1 | 2012-11-30 OKAZAKI Tetsurou <okazaki.tetsurou@gmail.com> (tiny change) | 6 | 2012-11-30 OKAZAKI Tetsurou <okazaki.tetsurou@gmail.com> (tiny change) |
| 2 | 7 | ||
| 3 | * vc/vc.el (vc-register): Allow registering a file which is | 8 | * vc/vc.el (vc-register): Allow registering a file which is |
diff --git a/lisp/longlines.el b/lisp/longlines.el index 68722a8f920..d249eaa6583 100644 --- a/lisp/longlines.el +++ b/lisp/longlines.el | |||
| @@ -278,7 +278,7 @@ end of the buffer." | |||
| 278 | If wrapping is performed, point remains on the line. If the line does | 278 | If wrapping is performed, point remains on the line. If the line does |
| 279 | not need to be wrapped, move point to the next line and return t." | 279 | not need to be wrapped, move point to the next line and return t." |
| 280 | (if (longlines-set-breakpoint) | 280 | (if (longlines-set-breakpoint) |
| 281 | (progn (insert-before-markers ?\n) | 281 | (progn (insert-before-markers-and-inherit ?\n) |
| 282 | (backward-char 1) | 282 | (backward-char 1) |
| 283 | (delete-char -1) | 283 | (delete-char -1) |
| 284 | (forward-char 1) | 284 | (forward-char 1) |
| @@ -384,8 +384,12 @@ compatibility with `format-alist', and is ignored." | |||
| 384 | (mod (buffer-modified-p))) | 384 | (mod (buffer-modified-p))) |
| 385 | (goto-char (min beg end)) | 385 | (goto-char (min beg end)) |
| 386 | (while (search-forward "\n" reg-max t) | 386 | (while (search-forward "\n" reg-max t) |
| 387 | (unless (get-text-property (match-beginning 0) 'hard) | 387 | (let ((pos (match-beginning 0))) |
| 388 | (replace-match " "))) | 388 | (unless (get-text-property pos 'hard) |
| 389 | (goto-char (1+ pos)) | ||
| 390 | (insert-and-inherit " ") | ||
| 391 | (delete-region pos (1+ pos)) | ||
| 392 | (remove-text-properties pos (1+ pos) 'hard)))) | ||
| 389 | (set-buffer-modified-p mod) | 393 | (set-buffer-modified-p mod) |
| 390 | end))) | 394 | end))) |
| 391 | 395 | ||