aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorOleh Krehel2013-10-12 22:30:23 -0700
committerGlenn Morris2013-10-12 22:30:23 -0700
commitfc7f501bc04f23af297fda7b6cb17df493b59397 (patch)
tree86fb5b87de23c132ac3a014a766e0562aede030b /lisp/replace.el
parentfdcb2049f193c889c36e67cd5c230286660d113a (diff)
downloademacs-fc7f501bc04f23af297fda7b6cb17df493b59397.tar.gz
emacs-fc7f501bc04f23af297fda7b6cb17df493b59397.zip
* lisp/replace.el (how-many): Fix rstart and !rend case.
Fixes: debbugs:15589
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index abb59a674e3..d92fb6809ef 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -810,9 +810,12 @@ a previously found match."
810 (keep-lines-read-args "How many matches for regexp")) 810 (keep-lines-read-args "How many matches for regexp"))
811 (save-excursion 811 (save-excursion
812 (if rstart 812 (if rstart
813 (progn 813 (if rend
814 (goto-char (min rstart rend)) 814 (progn
815 (setq rend (max rstart rend))) 815 (goto-char (min rstart rend))
816 (setq rend (max rstart rend)))
817 (goto-char rstart)
818 (setq rend (point-max)))
816 (if (and interactive transient-mark-mode mark-active) 819 (if (and interactive transient-mark-mode mark-active)
817 (setq rstart (region-beginning) 820 (setq rstart (region-beginning)
818 rend (region-end)) 821 rend (region-end))