emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#15589: closed ([PATCH] `how-many' throws when call


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#15589: closed ([PATCH] `how-many' throws when called with two arguments.)
Date: Sun, 13 Oct 2013 05:31:01 +0000

Your message dated Sun, 13 Oct 2013 01:30:36 -0400
with message-id <address@hidden>
and subject line Re: bug#15589: [PATCH] `how-many' throws when called with two 
arguments.
has caused the debbugs.gnu.org bug report #15589,
regarding [PATCH] `how-many' throws when called with two arguments.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
15589: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15589
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] `how-many' throws when called with two arguments. Date: Fri, 11 Oct 2013 16:33:29 +0200 User-agent: mu4e 0.9.9.5; emacs 24.3.4
Hi,

It's strange that it throws, since there's a sane default for `rend'
which is (point-max). It's currently used when neither `rstart' or
`rend' are provided.

I attach a patch.
>From e315068e21519a11b0f28e8d45fb08b5bab35850 Mon Sep 17 00:00:00 2001
From: Oleh Krehel <address@hidden>
Date: Fri, 11 Oct 2013 16:27:20 +0200
Subject: [PATCH] * replace.el (how-many): rend argument defaults to
 (point-max) if not provided.

---
 replace.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/replace.el b/replace.el
index abb59a6..d92fb68 100644
--- a/replace.el
+++ b/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))
-- 
1.8.4

regards,
Oleh

--- End Message ---
--- Begin Message --- Subject: Re: bug#15589: [PATCH] `how-many' throws when called with two arguments. Date: Sun, 13 Oct 2013 01:30:36 -0400 User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
Version: 24.4

Thanks; applied.


--- End Message ---

reply via email to

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