aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2002-07-12 23:28:15 +0000
committerRichard M. Stallman <[email protected]>2002-07-12 23:28:15 +0000
commit119831da31e1181628d9d7db281accca641d7fd0 (patch)
tree0524830da65c758a27f98acad53b0e0770df5048
parente870de8835d8ddcf54b4879bc0e32c1d08035b95 (diff)
(flush-lines, keep-lines): Convert REND to a marker.
-rw-r--r--lisp/replace.el8
1 files 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)))