1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 02:31:03 -08:00

simplify last fix.

This commit is contained in:
Chong Yidong 2006-07-13 14:45:10 +00:00
parent 8788120ff4
commit e17833bc7d

View file

@ -396,22 +396,11 @@ that has changed."
"Perform line wrapping on the parts of the buffer that have changed. "Perform line wrapping on the parts of the buffer that have changed.
This is called by `post-command-hook' after each command." This is called by `post-command-hook' after each command."
(when longlines-wrap-beg (when longlines-wrap-beg
(cond ((or (eq this-command 'yank) (if (or (eq this-command 'yank)
(eq this-command 'yank-pop)) (eq this-command 'yank-pop))
(longlines-decode-region (point) (mark t)) (longlines-decode-region (point) (mark t)))
(if longlines-showing (if longlines-showing
(longlines-show-region (point) (mark t)))) (longlines-show-region longlines-wrap-beg longlines-wrap-end))
(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))))))))
(unless (or (eq this-command 'fill-paragraph) (unless (or (eq this-command 'fill-paragraph)
(eq this-command 'fill-region)) (eq this-command 'fill-region))
(longlines-wrap-region longlines-wrap-beg longlines-wrap-end)) (longlines-wrap-region longlines-wrap-beg longlines-wrap-end))