Subject: bug#60741: 29.0.60; 'M-c' shadowed in the minibuffer

From: Juri Linkov <[email-masked]>
Date: Wed, 11 Jan 2023 21:54:48 +0200

etc/NEWS:

  +++
  ** 'M-c' in 'read-regexp' now toggles case folding.

'M-c' is bound globally to 'capitalize-word', but this keybinding
is shadowed in the minibuffer, thus making it impossible to
capitalize words.

Isearch had this problem for a long time but now it's already solved with:

  (put 'isearch-toggle-case-fold :advertised-binding "\M-sc")

where 'M-s c' is used to toggle search case-sensitivity.

So to avoid the problem the same could be done in 'read-regexp':

```
diff --git a/lisp/replace.el b/lisp/replace.el
index 2f063bbf66b..9471435bda3 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -824,7 +830,7 @@ read-regexp-suggestions
 
 (defvar-keymap read-regexp-map
   :parent minibuffer-local-map
-  "M-c" #'read-regexp-toggle-case-folding)
+  "M-s c" #'read-regexp-toggle-case-folding)
 
 (defvar read-regexp--case-fold nil)
 
```