From xemacs-m  Tue Jun 10 15:56:23 1997
Received: from newman.aventail.com (root@newman.aventail.com [199.238.236.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id PAA02192
	for <xemacs-beta@xemacs.org>; Tue, 10 Jun 1997 15:56:22 -0500 (CDT)
Received: from kramer.in.aventail.com.aventail.com (wmperry@kramer.in.aventail.com [192.168.1.12])
	by newman.aventail.com (8.8.5/8.8.5) with SMTP id NAA26421
	for <xemacs-beta@xemacs.org>; Tue, 10 Jun 1997 13:56:23 -0700 (PDT)
To: xemacs-beta@xemacs.org
Subject: [Michael Ernst <mernst@cs.washington.edu>] Emacs 19.34: problem with hyphens in regular expressions
Errors-to: wmperry@aventail.com
Reply-to: wmperry@aventail.com
X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7</SYF`{vYQ(&RI1&EiH[FvT;J}@f!4kfz
 x_!Y#=y{Uuj9GvUi=cPuajQ(Z42R[wE@{G,sn$qGr5g/wnb*"*ktI+,CD}1Z'wxrM2ag-r0p5I6\nA
 [WJopW_J.WY;
From: wmperry@aventail.com (William M. Perry)
Date: 10 Jun 1997 13:56:22 -0700
Message-ID: <86d8pu9nyh.fsf@kramer.in.aventail.com>
Lines: 53
X-Mailer: Gnus v5.4.56/XEmacs 20.3(beta5) - "Zagreb"

These all appear to still happen with XEmacs 20.3b5 - they are fixed in the 
development version of 20.1 though.

-Bill P.

-- 
William Perry			wmperry@aventail.com
Unix Server Development Lead  & Emacs-W3 Author
Aventail, Corp.			http://www.aventail.com
------- Start of forwarded message -------
Date: Sat, 17 May 1997 22:11:33 -0700
Message-Id: <199705180511.WAA14531@nishin.cs.washington.edu>
From: Michael Ernst <mernst@cs.washington.edu>
To: bug-gnu-emacs@prep.ai.mit.edu
cc: Richard Stallman <rms@ai.mit.edu>, Karl Heuer <kwzh@gnu.ai.mit.edu>
cc: Bill Perry <wmperry@indiana.edu>
Subject: Emacs 19.34: problem with hyphens in regular expressions

I'm having a few problems with hyphens in regular expressions in Emacs 19.34.

1. (string-match "[a-b-d]" "-")  returns nil (fails to match), though I
   think this regular expression should match a, b, d, or "-".

2. (string-match "[b---]" "b")  returns nil (fails to match), but 
   (string-match "[b---c]" "b")  returns 0 (matches).  I think the latter
   should match whatever the first does, plus c.  Both do match "-", but
   not "b".

3. (string-match "[x----d]" "-")  returns 0 (matches), but produces no
   error or warning.  It would be nice to check regular expressions, or to
   update the description in the manual to describe what this means, if it
   is meaningful.

4. The manual should note that when character Y precedes character Z (in
   ASCII ordering), "[Z-Y]" matches nothing.  (Did I correctly infer the rule?)

5. The set "[]z-y-]" contains just `-' and `]', contrary to the manual's
   claim that such a set cannot be written.

Here's what node "Syntax of Regexps" of the Emacs Lisp Reference Manual
(edition 2.4b) has to say about including hyphens in regular expressions:

     To include a `-', write
     `-' as the first character in the set, or put it immediately after
     a range.  (You can replace one individual character C with the
     range `C-C' to make a place to put the `-'.)  There is no way to
     write a set containing just `-' and `]'.

					-Michael Ernst
					 mernst@cs.washington.edu


------- End of forwarded message -------

