From: Juri Linkov Date: Wed, 18 Jan 2023 18:05:19 +0000 (+0200) Subject: Rebind in read-regexp-map ‘M-c’ to ‘M-s c’ compatible with search-map X-Git-Tag: emacs-29.0.90~676 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8e9783b4ce42122a8670f16f21a73597a226b674;p=emacs.git Rebind in read-regexp-map ‘M-c’ to ‘M-s c’ compatible with search-map Also it's compatible with 'M-s c' (isearch-toggle-case-fold) used during Isearch. Also makes possible to use the global keybinding 'M-c' (capitalize-dwim) in the minibuffer. * doc/lispref/minibuf.texi (Text from Minibuffer): Rename ‘M-c’ to ‘M-s c’. * lisp/replace.el (read-regexp-map): Rebind ‘M-c’ to ‘M-s c’ (bug#60741). (read-regexp-toggle-case-fold): Rename from read-regexp-toggle-case-folding to more standard name. --- diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 18125c372ce..114e5d38a80 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -312,7 +312,7 @@ to @code{regexp-history}. @cindex @code{case-fold}, text property @findex read-regexp-case-fold-search -The user can use the @kbd{M-c} command to indicate whether case +The user can use the @kbd{M-s c} command to indicate whether case folding should be on or off. If the user has used this command, the returned string will have the text property @code{case-fold} set to either @code{fold} or @code{inhibit-fold}. It is up to the caller of diff --git a/etc/NEWS b/etc/NEWS index 14941b906ef..9f735bec443 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3807,7 +3807,7 @@ These function now take an optional comparison PREDICATE argument. ** 'read-multiple-choice' can now use long-form answers. +++ -** 'M-c' in 'read-regexp' now toggles case folding. +** 'M-s c' in 'read-regexp' now toggles case folding. +++ ** 'completing-read' now allows a function as its REQUIRE-MATCH argument. diff --git a/lisp/replace.el b/lisp/replace.el index 2f063bbf66b..3c2b925ea92 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -824,11 +824,11 @@ by this function to the end of values available via (defvar-keymap read-regexp-map :parent minibuffer-local-map - "M-c" #'read-regexp-toggle-case-folding) + "M-s c" #'read-regexp-toggle-case-fold) (defvar read-regexp--case-fold nil) -(defun read-regexp-toggle-case-folding () +(defun read-regexp-toggle-case-fold () (interactive) (setq read-regexp--case-fold (if (or (eq read-regexp--case-fold 'fold) @@ -875,7 +875,7 @@ in \":\", followed by optional whitespace), DEFAULT is added to the prompt. The optional argument HISTORY is a symbol to use for the history list. If nil, use `regexp-history'. -If the user has used the \\\\[read-regexp-toggle-case-folding] command to specify case +If the user has used the \\\\[read-regexp-toggle-case-fold] command to specify case sensitivity, the returned string will have a text property named `case-fold' that has a value of either `fold' or `inhibit-fold'. (It's up to the caller of `read-regexp' to