emacs-devel
[Top][All Lists]
Advanced

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

Re: Discrepancy in definition/use of match-data?


From: Richard Stallman
Subject: Re: Discrepancy in definition/use of match-data?
Date: Fri, 18 Jun 2004 23:19:52 -0400

    OK, I have tripped this in three functions so far.  All of them look
    relevant to GNU Emacs.

    isearch.el (isearch-repeat):  both calls to match-{beginning,end}

It is checking whether the last match for the search string was empty.
I think this change should make it work without using the match-data.
Does it work?

*** isearch.el  06 Jun 2004 09:56:16 -0400      1.228
--- isearch.el  18 Jun 2004 22:10:53 -0400      
***************
*** 999,1005 ****
  
    (if (equal isearch-string "")
        (setq isearch-success t)
!     (if (and isearch-success (equal (match-end 0) (match-beginning 0))
             (not isearch-just-started))
        ;; If repeating a search that found
        ;; an empty string, ensure we advance.
--- 999,1006 ----
  
    (if (equal isearch-string "")
        (setq isearch-success t)
!     (if (and isearch-success
!            (equal (point) isearch-other-end)
             (not isearch-just-started))
        ;; If repeating a search that found
        ;; an empty string, ensure we advance.




reply via email to

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