Article View: gnu.emacs.bug
Article #1095(none)
From: ET%IB.RL.AC.UK
Date: Tue, 25 Oct 1988 14:54
Date: Tue, 25 Oct 1988 14:54
40 lines
1571 bytes
1571 bytes
Received: by emeraude.dedlpr.bull.fr (BULLNET-1.1); Fri, 21 Oct 88 14:51:01
+0100 (MET)
Date: Fri, 21 Oct 88 14:51:01 +0100
From: mcvax!emeraude.dedlpr.bull.fr!macrakis@uunet.uu.net (Stavros Macrakis)
Message-Id: <8810211351.AA08532@emeraude.dedlpr.bull.fr>
To: bug-gnu-emacs@prep.ai.mit.edu
Cc: frasq@emeraude.dedlpr
Subject: Search registers and alternatives
Gnu Emacs 18.50 (usg-unix-v)
In regex searches, in the presence of alternation (\|), marked
substrings (\n) have funny behavior.
Try the following:
(defun regtest ()
(insert "this is a foo")
(goto-char (point-min))
(re-search-forward "\\(bar\\)\\|foo")
(setq standard-output (current-buffer))
(prin1 (match-data)))
(regtest)
Sometimes you get something like:
(#<marker at 308 in bf> #<marker at 311 in bf> #<marker at 308 in bf>
#<marker at 581 in bf>)
; I think 581 = point-max + 1
And sometimes:
(#<marker at 268 in bf> #<marker at 271 in bf> #<marker at 268 in bf>
#<marker at 1 in bf>))
That is, the end of the unmatched substring seems to be either point-min or
point-max + 1. Why is it non-nil at all? I would have expected:
(#<marker at 268 in bf> #<marker at 271 in bf> nil nil)
Technical Details
Message-ID:
<8810252117.AA21309@prep.ai.mit.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!uunet!tut.cis.ohio-state.edu!MITVMA.MIT.EDU!ET%IB.RL.AC.UKShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!uunet!tut.cis.ohio-state.edu!MITVMA.MIT.EDU!ET%IB.RL.AC.UK From: ET%IB.RL.AC.UK@MITVMA.MIT.EDU Newsgroups: gnu.emacs.bug Subject: (none) Message-ID: <8810252117.AA21309@prep.ai.mit.edu> Date: 25 Oct 88 14:54:00 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 40