diff options
| author | Oleh Krehel <ohwoeowho@gmail.com> | 2013-10-12 22:30:23 -0700 |
|---|---|---|
| committer | Glenn Morris <rgm@gnu.org> | 2013-10-12 22:30:23 -0700 |
| commit | fc7f501bc04f23af297fda7b6cb17df493b59397 (patch) | |
| tree | 86fb5b87de23c132ac3a014a766e0562aede030b /lisp/replace.el | |
| parent | fdcb2049f193c889c36e67cd5c230286660d113a (diff) | |
| download | emacs-fc7f501bc04f23af297fda7b6cb17df493b59397.tar.gz | |
* lisp/replace.el (how-many): Fix rstart and !rend case.
Fixes: debbugs:15589
Diffstat (limited to 'lisp/replace.el')
| -rw-r--r-- | lisp/replace.el | 9 |
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." (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)) |
