Mercurial > emacs
comparison lisp/longlines.el @ 90533:8a8e69664178
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 343-356)
- Update from CVS
- Update for ERC 5.1.3.
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 113-115)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-90
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 19 Jul 2006 00:42:56 +0000 |
parents | 0048306da39e |
children | 1d3db748db52 |
comparison
equal
deleted
inserted
replaced
90532:e22cf6d2400c | 90533:8a8e69664178 |
---|---|
394 | 394 |
395 (defun longlines-post-command-function () | 395 (defun longlines-post-command-function () |
396 "Perform line wrapping on the parts of the buffer that have changed. | 396 "Perform line wrapping on the parts of the buffer that have changed. |
397 This is called by `post-command-hook' after each command." | 397 This is called by `post-command-hook' after each command." |
398 (when longlines-wrap-beg | 398 (when longlines-wrap-beg |
399 (cond ((or (eq this-command 'yank) | 399 (if (or (eq this-command 'yank) |
400 (eq this-command 'yank-pop)) | 400 (eq this-command 'yank-pop)) |
401 (longlines-decode-region (point) (mark t)) | 401 (longlines-decode-region (point) (mark t))) |
402 (if longlines-showing | 402 (if longlines-showing |
403 (longlines-show-region (point) (mark t)))) | 403 (longlines-show-region longlines-wrap-beg longlines-wrap-end)) |
404 ((and (eq this-command 'newline) longlines-showing) | |
405 (save-excursion | |
406 (if (search-backward "\n" nil t) | |
407 (longlines-show-region | |
408 (match-beginning 0) (match-end 0)))))) | |
409 (unless (or (eq this-command 'fill-paragraph) | 404 (unless (or (eq this-command 'fill-paragraph) |
410 (eq this-command 'fill-region)) | 405 (eq this-command 'fill-region)) |
411 (longlines-wrap-region longlines-wrap-beg longlines-wrap-end)) | 406 (longlines-wrap-region longlines-wrap-beg longlines-wrap-end)) |
412 (setq longlines-wrap-beg nil) | 407 (setq longlines-wrap-beg nil) |
413 (setq longlines-wrap-end nil))) | 408 (setq longlines-wrap-end nil))) |