Subject: Re: bug#22991: 25.0.92: C-u C-s does not display "Regexp I-search:" in the echo area

From: Eli Zaretskii <[email-masked]>
Date: Fri, 11 Mar 2016 22:54:08 +0200

> From: Kaushal Modi <[email-masked]>
> Date: Fri, 11 Mar 2016 15:46:29 -0500
> 
> The below patch fixes this bug for me.
> 
> I simply promoted the priority of isearch-regexp in that cond.
> 
> I hope I am not overlooking something else by doing so.
> 
> With that, now C-u C-s shows "Regexp I-search:" when the search of
> search-default-mode is either nil or character-fold-to-regexp.
> 
> 
> diff --git a/lisp/isearch.el b/lisp/isearch.el
> index b8ada2c..47dedfa 100644
> --- a/lisp/isearch.el
> +++ b/lisp/isearch.el
> @@ -2575,12 +2575,12 @@ isearch--describe-regexp-mode
>      (setq regexp-function #'word-search-regexp))
>    (let ((description
>           ;; Don't use a description on the default search mode.
> -         (cond ((equal regexp-function search-default-mode) "")
> +         (cond (isearch-regexp "regexp ")
> +               ((equal regexp-function search-default-mode) "")
>                 (regexp-function
>                  (and (symbolp regexp-function)
>                       (or (get regexp-function 'isearch-message-prefix)
>                           "")))
> -               (isearch-regexp "regexp ")
>                 ;; We're in literal mode. If the default mode is not
>                 ;; literal, then describe it.
>                 ((functionp search-default-mode) "literal "))))

What if search-default-mode is t, i.e. the default is regexp search?

Thanks.