From 119831da31e1181628d9d7db281accca641d7fd0 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 12 Jul 2002 23:28:15 +0000 Subject: (flush-lines, keep-lines): Convert REND to a marker. --- lisp/replace.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/replace.el b/lisp/replace.el index a182df02ca..a66c9c0dfc 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))) -- cgit v1.2.3