aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2006-07-13 14:45:10 +0000
committerChong Yidong2006-07-13 14:45:10 +0000
commite17833bc7d723d70600ab8df9a3cce04f01544ea (patch)
tree9fe049ed1419d7bd5d2f7a83056f4da8367d9457
parent8788120ff42d2e5c0be7f2a9856517e7075252ba (diff)
downloademacs-e17833bc7d723d70600ab8df9a3cce04f01544ea.tar.gz
emacs-e17833bc7d723d70600ab8df9a3cce04f01544ea.zip
simplify last fix.
-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."
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.
397This is called by `post-command-hook' after each command." 397This 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 (longlines-showing
405 (cond ((eq this-command 'newline)
406 (save-excursion
407 (if (search-backward "\n" nil t)
408 (longlines-show-region
409 (match-beginning 0) (match-end 0)))))
410 ((eq this-command 'open-line)
411 (save-excursion
412 (if (search-forward "\n" nil t)
413 (longlines-show-region
414 (match-beginning 0) (match-end 0))))))))
415 (unless (or (eq this-command 'fill-paragraph) 404 (unless (or (eq this-command 'fill-paragraph)
416 (eq this-command 'fill-region)) 405 (eq this-command 'fill-region))
417 (longlines-wrap-region longlines-wrap-beg longlines-wrap-end)) 406 (longlines-wrap-region longlines-wrap-beg longlines-wrap-end))