Switch the order of the capitalized and uppercased tests in
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Tue, 1 Dec 1992 14:47:07 +0000 (14:47 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Tue, 1 Dec 1992 14:47:07 +0000 (14:47 +0000)
replace-match.  It only makes a difference on strings of length 1, in
which case it preferes to capitalize.

v7/src/edwin/regexp.scm

index fcd7bcb0b6910048be03b17fb927b273f75fb005..28fbb435dd18e5c5b76d1c0b4b9916d4dcbfd457 100644 (file)
@@ -1,8 +1,8 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/regexp.scm,v 1.62 1992/04/02 08:14:57 cph Exp $
+;;;    $Id: regexp.scm,v 1.63 1992/12/01 14:47:07 gjr Exp $
 ;;;
-;;;    Copyright (c) 1986, 1989-92 Massachusetts Institute of Technology
+;;;    Copyright (c) 1986, 1989-1992 Massachusetts Institute of Technology
 ;;;
 ;;;    This material was developed by the Scheme project at the
 ;;;    Massachusetts Institute of Technology, Department of
                 ;; words, and then changes each word in the
                 ;; replacement to match the pattern.
                 (let ((replaced (extract-string start end)))
-                  (cond ((string-upper-case? replaced)
-                         (string-upcase replacement))
-                        ((string-capitalized? replaced)
+                  (cond ((string-capitalized? replaced)
                          (string-capitalize replacement))
+                        ((string-upper-case? replaced)
+                         (string-upcase replacement))
                         (else replacement)))
                 replacement))))
       (delete-string start end)