Function: dictionary-search
dictionary-search is an autoloaded, interactive and byte-compiled
function defined in dictionary.el.gz.
Signature
(dictionary-search WORD &optional DICTIONARY)
Documentation
Search for WORD in all the known dictionaries.
Interactively, prompt for WORD, and offer the word at point as default.
Optional argument DICTIONARY means restrict the search to only that one dictionary. Interactively, with prefix argument, prompt for DICTIONARY.
Probably introduced at or before Emacs version 28.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/net/dictionary.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; User callable commands
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;###autoload
(defun dictionary-search (word &optional dictionary)
"Search for WORD in all the known dictionaries.
Interactively, prompt for WORD, and offer the word at point as default.
Optional argument DICTIONARY means restrict the search to only
that one dictionary. Interactively, with prefix argument,
prompt for DICTIONARY."
(interactive
(let ((dict
(if current-prefix-arg
(funcall dictionary-read-dictionary-function)
dictionary-default-dictionary)))
(list (funcall dictionary-read-word-function dict) dict)))
(unless dictionary
(setq dictionary dictionary-default-dictionary))
(if dictionary-display-definition-function
(if-let ((definition (dictionary-define-word word dictionary)))
(funcall dictionary-display-definition-function word dictionary definition)
(user-error "No definition found for \"%s\"" word))
;; if called by pressing the button
(unless word
(setq word (read-string "Search word: " nil 'dictionary-word-history)))
;; just in case non-interactively called
(dictionary-new-search (cons word dictionary))))