bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11381: 23.3; isearch-search-and-update issue?


From: Stefan Monnier
Subject: bug#11381: 23.3; isearch-search-and-update issue?
Date: Mon, 28 May 2012 10:08:15 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

>> Do we really need those 4?  I think we can just get away with
>> symbol-search-regexp (whose name also needs to start with "isearch-").
> In the next patch these functions are removed and symbol-search-regexp
> is renamed to isearch-symbol-regexp.

Thanks, see comments below.

>>> Also it splits the standard default part of `isearch-search-fun'
>> You could actually set isearch-search-fun-function's default to
>> isearch-search-fun-default so we can just unconditionally call
>> isearch-search-fun-function's.

> It still needs protection against such cases as currently existing in
> several places in internal and probably also in external packages:

>     (let ((isearch-search-fun-function nil))
>       (isearch-search-fun))

For the internal cases, the above should be replaced by a call to
isearch-search-fun-default.  Obviously, if there are external such
cases, we'll indeed need to additionally keep:

>     (funcall (or isearch-search-fun-function 'isearch-search-fun-default))

[...]
> === modified file 'lisp/isearch.el'
> --- lisp/isearch.el   2012-05-17 00:03:49 +0000
> +++ lisp/isearch.el   2012-05-28 08:38:31 +0000
> @@ -503,6 +512,7 @@ (defvar isearch-mode-map
 
>      (define-key map "\M-sr" 'isearch-toggle-regexp)
>      (define-key map "\M-sw" 'isearch-toggle-word)
> +    (define-key map "\M-s_" 'isearch-toggle-symbol)

BTW, could you add isearch-toggle-case-fold to the M-s prefix, while
you're at it?

>  (defun Info-isearch-search ()

I think we can share even more code here with isearch.el.

But in any case, the patch looks good now, thank you,


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]