On Thu, Nov 24, 2022 at 07:25:56AM -0500, John Covici wrote: > Hi. I have a shell script like this > JawMuscles1 > followed by other similar names. > > I wanted to replace each item in the file like this: > > Replace regexp (default ^.*$ → cd jawstemp; unzip ../\&.zip;mkdir > ../\&;mv * ..\&;cd .. > > but Emacs capitalized every word in the replaced lines, including all > the commands -- it replaced unzip with Unzip etc. > > I have never seen this before. The file is type shellscript. > > How to prevent this? Try to set the variable `case-replace' to nil. Cf the section "Replace Command and Lax Matches" in the Emacs manual for a more detailed story. You can set this variable's value via the Customize interface. Cheers -- t