Fix references to old dictionary/thesaurus lookup commands
And pass word explicitly to powerthesaurus.
This commit is contained in:
parent
f313c77ac7
commit
6938f8b97d
2 changed files with 10 additions and 3 deletions
|
@ -353,4 +353,11 @@ Otherwise, falls back on `find-file-at-point'."
|
|||
(unless +lookup-dictionary-enable-online
|
||||
;; TODO Implement offline synonyms backend
|
||||
(user-error "No offline dictionary implemented yet"))
|
||||
(powerthesaurus-lookup-word-dwim))
|
||||
;; Necessary because powerthesaurus lacks a way to pass text directly
|
||||
(with-temp-buffer
|
||||
(insert identifier)
|
||||
;; HACK I'd rather use `+lookup-symbol-or-region' for consistency, but
|
||||
;; powerthesaurus lacks a simple way to pass a string directly to any
|
||||
;; of its lookup functions, so...
|
||||
(cl-letf (((symbol-function 'use-region-p) (lambda () t)))
|
||||
(powerthesaurus-lookup-word (point-min) (point-max)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue