Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!tds.kth.se!juha From: juha@tds.kth.se (Juha Sarlin) Newsgroups: gnu.emacs.bug Subject: match data cannot always be restored Message-ID: <8910201435.AA02459@ttds.tds.kth.se> Date: 20 Oct 89 16:35:27 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 18 After a string-match the value of (match-beginning 0) can be zero. The zero is changed into one by: (store-match-data (match-data)) The function below demonstrates the error. In emacs 18.55 on a Sun 3/60 running SunOS 4.0.1 it returns (0 1), which means that match-beginning has changed from 0 to 1. (defun bug () (string-match "foo" "foobar") (let ((before (match-beginning 0))) (store-match-data (match-data)) (list before (match-beginning 0)))) This error makes the debugging of some functions that use string-match difficult, because the debugger uses match-data and store-match-data. -- Juha Sarlin juha@tds.kth.se