[climacs-cvs] CVS update: climacs/gui.lisp

Christophe Rhodes crhodes at common-lisp.net
Thu Oct 13 09:34:13 UTC 2005


Update of /project/climacs/cvsroot/climacs
In directory common-lisp.net:/tmp/cvs-serv18560

Modified Files:
	gui.lisp 
Log Message:
Fix for unintuitive capitalization of replacement string ("X4" replaced 
by "Xa////" got turned into "XA////").

Date: Thu Oct 13 11:34:12 2005
Author: crhodes

Index: climacs/gui.lisp
diff -u climacs/gui.lisp:1.190 climacs/gui.lisp:1.191
--- climacs/gui.lisp:1.190	Tue Oct 11 23:20:52 2005
+++ climacs/gui.lisp	Thu Oct 13 11:34:12 2005
@@ -1975,10 +1975,11 @@
       (insert-sequence point string2)
       (setf offset2 (+ offset1 (length string2)))
       (finish-output *error-output*)
-      (case region-case
-        (:upper-case (upcase-buffer-region buffer offset1 offset2))
-        (:lower-case (downcase-buffer-region buffer offset1 offset2))
-        (:capitalized (capitalize-buffer-region buffer offset1 offset2))))
+      (unless (find-if #'upper-case-p string1)
+        (case region-case
+          (:upper-case (upcase-buffer-region buffer offset1 offset2))
+          (:lower-case (downcase-buffer-region buffer offset1 offset2))
+          (:capitalized (capitalize-buffer-region buffer offset1 offset2)))))
     (incf occurrences)
     (if (query-replace-find-next-match point string1)
 	(display-message "Query Replace ~A with ~A:"




More information about the Climacs-cvs mailing list