When searching on whitespace: default to "lexical"

This commit is contained in:
TEC 2021-07-29 21:18:22 +08:00
parent 989743c6a6
commit 8cd77e5c32
Signed by: tec
GPG Key ID: 779591AFDB81F06C
1 changed files with 5 additions and 2 deletions

View File

@ -216,7 +216,8 @@ TODO decouple the tool from the general method."
(guess (or (and transient-mark-mode mark-active
(buffer-substring-no-properties
(region-beginning) (region-end)))
(current-word nil t)))
(current-word nil t)
"lexical"))
(word (read-string (format "Search dict (default: %s): " guess)
nil nil guess)))
(list word dict-list-name dict-list t)))
@ -279,7 +280,9 @@ TODO decouple the tool from the general method."
(or (and transient-mark-mode mark-active
(buffer-substring-no-properties
(region-beginning) (region-end)))
(current-word nil t))) nil nil t))
(current-word nil t)
"lexical"))
nil nil t))
(defun lexic-list-dictionary ()
"Show available dictionaries."