From 8770d9770e96699d24d58c7ff3aaf9e8616fddb5 Mon Sep 17 00:00:00 2001 From: Zedhugh Chen Date: Wed, 12 Feb 2025 15:57:07 +0800 Subject: [PATCH] change the way sdcv-say-word-dwim works in sdcv-mode --- lisp/init-sdcv.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/init-sdcv.el b/lisp/init-sdcv.el index 88650fb..47b6f9d 100644 --- a/lisp/init-sdcv.el +++ b/lisp/init-sdcv.el @@ -15,7 +15,10 @@ (sdcv-say-word (if (region-active-p) (buffer-substring-no-properties (region-beginning) (region-end)) - (word-at-point t)))) + (let ((word (word-at-point t))) + (when (and (not word) (eq major-mode 'sdcv-mode)) + (setq word sdcv-current-translate-object)) + word)))) (lazy-load-local-keys '(("s" . sdcv-search-pointer)