emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114645: * lisp/replace.el (how-many): Fix rstart an


From: Glenn Morris
Subject: [Emacs-diffs] trunk r114645: * lisp/replace.el (how-many): Fix rstart and !rend case.
Date: Sun, 13 Oct 2013 05:30:29 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114645
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15589
author: Oleh Krehel <address@hidden>
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2013-10-12 22:30:23 -0700
message:
  * lisp/replace.el (how-many): Fix rstart and !rend case.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/replace.el                replace.el-20091113204419-o5vbwnq5f7feedwu-119
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-10-13 05:23:42 +0000
+++ b/lisp/ChangeLog    2013-10-13 05:30:23 +0000
@@ -1,3 +1,7 @@
+2013-10-13  Oleh Krehel  <address@hidden>
+
+       * replace.el (how-many): Fix rstart and !rend case.  (Bug#15589)
+
 2013-10-13  Andreas Politz  <address@hidden>
 
        * progmodes/sql.el (sql-add-product): Fix paren typo.  (Bug#15435)

=== modified file 'lisp/replace.el'
--- a/lisp/replace.el   2013-09-06 01:38:45 +0000
+++ b/lisp/replace.el   2013-10-13 05:30:23 +0000
@@ -810,9 +810,12 @@
    (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))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]