From f75a34af2d56a09514cf118d445130151c29871c Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Tue, 1 Dec 1992 14:47:07 +0000 Subject: [PATCH] Switch the order of the capitalized and uppercased tests in replace-match. It only makes a difference on strings of length 1, in which case it preferes to capitalize. --- v7/src/edwin/regexp.scm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/v7/src/edwin/regexp.scm b/v7/src/edwin/regexp.scm index fcd7bcb0b..28fbb435d 100644 --- a/v7/src/edwin/regexp.scm +++ b/v7/src/edwin/regexp.scm @@ -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 @@ -130,10 +130,10 @@ ;; 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) -- 2.25.1