]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/replace.el (how-many): Fix rstart and !rend case.
authorOleh Krehel <ohwoeowho@gmail.com>
Sun, 13 Oct 2013 05:30:23 +0000 (22:30 -0700)
committerGlenn Morris <rgm@gnu.org>
Sun, 13 Oct 2013 05:30:23 +0000 (22:30 -0700)
Fixes: debbugs:15589
lisp/ChangeLog
lisp/replace.el

index bd2a69c89a818b2f497f51031268fb993f06b988..ec59ce1fb6629b1ae1aa0b2161950ebef3960e60 100644 (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)
index abb59a674e380d5fd393f78af2312135bcacf2e3..d92fb6809efcc8aa98ac51a6e62690beeaf5d1e1 100644 (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))