* lisp/replace.el (how-many): Fix rstart and !rend case.

Fixes: debbugs:15589
This commit is contained in:
Oleh Krehel 2013-10-12 22:30:23 -07:00 committed by Glenn Morris
parent fdcb2049f1
commit fc7f501bc0
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,7 @@
2013-10-13 Oleh Krehel <ohwoeowho@gmail.com>
* replace.el (how-many): Fix rstart and !rend case. (Bug#15589)
2013-10-13 Andreas Politz <politza@hochschule-trier.de>
* progmodes/sql.el (sql-add-product): Fix paren typo. (Bug#15435)

View file

@ -810,9 +810,12 @@ a previously found match."
(keep-lines-read-args "How many matches for regexp"))
(save-excursion
(if rstart
(progn
(goto-char (min rstart rend))
(setq rend (max rstart rend)))
(if rend
(progn
(goto-char (min rstart rend))
(setq rend (max rstart rend)))
(goto-char rstart)
(setq rend (point-max)))
(if (and interactive transient-mark-mode mark-active)
(setq rstart (region-beginning)
rend (region-end))