开发者

How can I disable this 'feature' of Emac's regexp replace (unwanted capitalization) [duplicate]

开发者 https://www.devze.com 2023-03-31 08:40 出处:网络
This question already has answers here: How do you tell Emac开发者_如何学Pythons to leave the case alone in a search and replace string?
This question already has answers here: How do you tell Emac开发者_如何学Pythons to leave the case alone in a search and replace string? (2 answers) Closed 9 years ago.

Say I have a buffer which contains:

Hello
HELLO

and I run a regexp-replace going from \(.*\) to \1 World!

The result is

Hello World!
HELLO WORLD!

While what I want is

Hello World!
HELLO World!

Is there an option somewhere I can set to do this?


Set case-replace to nil, like this:

(setq case-replace nil)

Then it will preserve the case in the replace.


C-h f query-replace-regexp RET

0

精彩评论

暂无评论...
验证码 换一张
取 消