pregexp-quote should quote ^ and $

original commit: 5044a024eeff810c7d00773a2b6f06a308acb22e
This commit is contained in:
Dorai Sitaram 2003-12-04 20:06:36 +00:00
parent 2eaf875b8d
commit 3b45b7165e

View File

@ -15,7 +15,7 @@
pregexp-quote
*pregexp-comment-char*)
;Configured for Scheme dialect plt by scmxlate, v 1a6,
;Configured for Scheme dialect plt by scmxlate, v 2003-08-24,
;(c) Dorai Sitaram,
;http://www.ccs.neu.edu/~dorai/scmxlate/scmxlate.html
@ -674,7 +674,9 @@
(loop
(- i 1)
(let ((c (string-ref s i)))
(if (memv c '(#\\ #\. #\? #\* #\+ #\| #\[ #\] #\{ #\} #\( #\)))
(if (memv
c
'(#\\ #\. #\? #\* #\+ #\| #\^ #\$ #\[ #\] #\{ #\} #\( #\)))
(cons #\\ (cons c r))
(cons c r))))))))