summaryrefslogtreecommitdiff
path: root/lisp/longlines.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-07-13 14:45:10 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-07-13 14:45:10 +0000
commite17833bc7d723d70600ab8df9a3cce04f01544ea (patch)
tree9fe049ed1419d7bd5d2f7a83056f4da8367d9457 /lisp/longlines.el
parent8788120ff42d2e5c0be7f2a9856517e7075252ba (diff)
downloademacs-e17833bc7d723d70600ab8df9a3cce04f01544ea.tar.gz
simplify last fix.
Diffstat (limited to 'lisp/longlines.el')
-rw-r--r--lisp/longlines.el21
1 files changed, 5 insertions, 16 deletions
diff --git a/lisp/longlines.el b/lisp/longlines.el
index 943ee80cc0b..9da3de217ab 100644
--- a/lisp/longlines.el
+++ b/lisp/longlines.el
@@ -396,22 +396,11 @@ that has changed."
"Perform line wrapping on the parts of the buffer that have changed.
This is called by `post-command-hook' after each command."
(when longlines-wrap-beg
- (cond ((or (eq this-command 'yank)
- (eq this-command 'yank-pop))
- (longlines-decode-region (point) (mark t))
- (if longlines-showing
- (longlines-show-region (point) (mark t))))
- (longlines-showing
- (cond ((eq this-command 'newline)
- (save-excursion
- (if (search-backward "\n" nil t)
- (longlines-show-region
- (match-beginning 0) (match-end 0)))))
- ((eq this-command 'open-line)
- (save-excursion
- (if (search-forward "\n" nil t)
- (longlines-show-region
- (match-beginning 0) (match-end 0))))))))
+ (if (or (eq this-command 'yank)
+ (eq this-command 'yank-pop))
+ (longlines-decode-region (point) (mark t)))
+ (if longlines-showing
+ (longlines-show-region longlines-wrap-beg longlines-wrap-end))
(unless (or (eq this-command 'fill-paragraph)
(eq this-command 'fill-region))
(longlines-wrap-region longlines-wrap-beg longlines-wrap-end))