Path: utzoo!utgpu!water!watmath!uunet!tut.cis.ohio-state.edu!UUNET.UU.NET!mcvax!emeraude.dedlpr.bull.fr!macrakis From: mcvax!emeraude.dedlpr.bull.fr!macrakis@UUNET.UU.NET (Stavros Macrakis) Newsgroups: gnu.emacs.bug Subject: Search registers and alternatives Message-ID: <8810211351.AA08532@emeraude.dedlpr.bull.fr> Date: 21 Oct 88 13:51:01 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 31 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: (# # # #) ; I think 581 = point-max + 1 And sometimes: (# # # #)) 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: (# # nil nil)