From 96e142a4d673338c955e9c7562a3adcf8e4830fb Mon Sep 17 00:00:00 2001 From: Luo Zhaoyu Date: Wed, 30 Jan 2019 00:52:59 -0500 Subject: [PATCH] change default search to word full match People usually search for specific class/function name, defaults to full match would be more straight forward --- listing-codesearch.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/listing-codesearch.el b/listing-codesearch.el index 1c24158..e89a2a4 100644 --- a/listing-codesearch.el +++ b/listing-codesearch.el @@ -126,7 +126,8 @@ clickable buttons that link to the matched file/line-number. "Search files matching `file-pattern'in the index for `pattern'." (interactive (list - (read-string "Pattern: " (thing-at-point 'symbol) + ; default to word full match + (read-string "Pattern: " (format "\\b%s\\b" (thing-at-point 'symbol)) 'listing-codesearch-pattern-history (car listing-codesearch-pattern-history)) (read-string "File pattern: " ".*" 'listing-codesearch-file-pattern-history (car listing-codesearch-file-pattern-history))))