GNU bug report logs -
#22589
25.0.90; First match found by isearch-forward-symbol is not necessarily a symbol.
Previous Next
Full log
View this message in rfc822 format
> Then it will match at the beginning of the symbol for a forward search,
> and at the end for a backward search. Same for the word search.
In bug#25562 we found no more ideas how to improve the support for
the process of entering incomplete words, so in addition to the patch
in bug#25562 that adds indication, also I'm going to install this patch
that will optimize the incomplete search by removing conditional
matching at the beginning:
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 5c48c30..90ffbec 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1621,7 +1621,7 @@ (defun word-search-regexp (string &optional lax)
((string-match-p "\\`\\W+\\'" string) "\\W+")
(t (concat
(if (string-match-p "\\`\\W" string) "\\W+"
- (unless lax "\\<"))
+ "\\<")
(mapconcat 'regexp-quote (split-string string "\\W+" t) "\\W+")
(if (string-match-p "\\W\\'" string) "\\W+"
(unless lax "\\>"))))))
@@ -1749,7 +1749,7 @@ (defun isearch-symbol-regexp (string &optional lax)
((string-match-p (format "\\`%s\\'" not-word-symbol-re) string) not-word-symbol-re)
(t (concat
(if (string-match-p (format "\\`%s" not-word-symbol-re) string) not-word-symbol-re
- (unless lax "\\_<"))
+ "\\_<")
(mapconcat 'regexp-quote (split-string string not-word-symbol-re t) not-word-symbol-re)
(if (string-match-p (format "%s\\'" not-word-symbol-re) string) not-word-symbol-re
(unless lax "\\_>")))))))
This bug report was last modified 8 years and 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.