From: Richard M. Stallman Date: Fri, 12 Jul 2002 23:28:15 +0000 (+0000) Subject: (flush-lines, keep-lines): Convert REND to a marker. X-Git-Tag: ttn-vms-21-2-B4~14168 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=119831da31e1181628d9d7db281accca641d7fd0;p=emacs.git (flush-lines, keep-lines): Convert REND to a marker. --- diff --git a/lisp/replace.el b/lisp/replace.el index a182df02ca4..a66c9c0dfc2 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -334,7 +334,9 @@ end of the buffer." (interactive (keep-lines-read-args "Keep lines (containing match for regexp): ")) (if rstart - (goto-char (min rstart rend)) + (progn + (goto-char (min rstart rend)) + (setq rend (copy-marker (max rstart rend)))) (if (and transient-mark-mode mark-active) (setq rstart (region-beginning) rend (copy-marker (region-end))) @@ -381,7 +383,9 @@ end of the buffer." (interactive (keep-lines-read-args "Flush lines (containing match for regexp): ")) (if rstart - (goto-char (min rstart rend)) + (progn + (goto-char (min rstart rend)) + (setq rend (copy-marker (max rstart rend)))) (if (and transient-mark-mode mark-active) (setq rstart (region-beginning) rend (copy-marker (region-end)))