# HG changeset patch # User Chong Yidong # Date 1152748338 0 # Node ID b5cc4afb08538f7130fb91ed92ab4e3995c5cbd6 # Parent d38f8a536fd2de8edde206719832caf05eae5e49 * longlines.el (longlines-post-command-function): Handle open-line too. diff -r d38f8a536fd2 -r b5cc4afb0853 lisp/ChangeLog --- a/lisp/ChangeLog Wed Jul 12 19:07:33 2006 +0000 +++ b/lisp/ChangeLog Wed Jul 12 23:52:18 2006 +0000 @@ -1,3 +1,8 @@ +2006-07-12 Chong Yidong + + * longlines.el (longlines-post-command-function): Handle open-line + too. + 2006-07-12 Richard Stallman * progmodes/grep.el (grep-last-buffer): Doc fix. diff -r d38f8a536fd2 -r b5cc4afb0853 lisp/longlines.el --- a/lisp/longlines.el Wed Jul 12 19:07:33 2006 +0000 +++ b/lisp/longlines.el Wed Jul 12 23:52:18 2006 +0000 @@ -401,11 +401,17 @@ (longlines-decode-region (point) (mark t)) (if longlines-showing (longlines-show-region (point) (mark t)))) - ((and (eq this-command 'newline) longlines-showing) - (save-excursion - (if (search-backward "\n" nil t) - (longlines-show-region - (match-beginning 0) (match-end 0)))))) + (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) (eq this-command 'fill-region)) (longlines-wrap-region longlines-wrap-beg longlines-wrap-end))