From: Stefan Kangas Date: Sat, 12 Aug 2023 14:40:10 +0000 (+0200) Subject: Improve dictionary-mode documentation X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d3dae88e6cc8118c875957ba0347be9599014b34;p=emacs.git Improve dictionary-mode documentation * lisp/net/dictionary.el (dictionary-mode): Improve docstring --- diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el index c1bbf04d4f2..8eb5c142f08 100644 --- a/lisp/net/dictionary.el +++ b/lisp/net/dictionary.el @@ -23,11 +23,12 @@ ;;; Commentary: ;; dictionary allows you to interact with dictionary servers. -;; Use M-x customize-group dictionary to modify user settings. +;; +;; Use `M-x customize-group RET dictionary RET' to modify user settings. ;; ;; Main commands for interaction are: -;; M-x dictionary - opens a new dictionary buffer -;; M-x dictionary-search - search for the definition of a word +;; `M-x dictionary' - open a new dictionary buffer +;; `M-x dictionary-search' - search for the definition of a word ;; ;; You can find more information in the README file of the GitHub ;; repository https://github.com/myrkr/dictionary-el @@ -425,23 +426,25 @@ Otherwise, `dictionary-search' displays definitions in a *Dictionary* buffer." ;;;###autoload (define-derived-mode dictionary-mode special-mode "Dictionary" "Mode for searching a dictionary. + This is a mode for searching a dictionary server implementing the protocol defined in RFC 2229. This is a quick reference to this mode describing the default key bindings: \\ -* \\[dictionary-close] close the dictionary buffer -* \\[describe-mode] display this help information -* \\[dictionary-search] ask for a new word to search -* \\[dictionary-lookup-definition] search the word at point -* \\[forward-button] or TAB place point to the next link -* \\[backward-button] or S-TAB place point to the prev link - -* \\[dictionary-match-words] ask for a pattern and list all matching words. -* \\[dictionary-select-dictionary] select the default dictionary -* \\[dictionary-select-strategy] select the default search strategy - -* \\`RET' or \\`' visit that link" + \\[dictionary-close] close the dictionary buffer + \\[describe-mode] display this help + \\[dictionary-search] ask for a new word to search + \\[dictionary-lookup-definition] search for word at point + \\[forward-button] or \\`TAB' move point to the next link + \\[backward-button] or \\`S-TAB' move point to the previous link + + \\[dictionary-match-words] ask for a pattern and list all matching words + \\[dictionary-select-dictionary] select the default dictionary + \\[dictionary-select-strategy] select the default search strategy + + \\`RET' visit link at point + \\`' visit clicked link" (buffer-disable-undo) (setq-local dictionary-data-stack nil) (setq-local dictionary-position-stack nil) @@ -1206,9 +1209,11 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." ;;;###autoload (defun dictionary-search (word &optional dictionary) - "Search the WORD in DICTIONARY if given or in all if nil. -It presents the selection or word at point as default input and -allows editing it." + "Prompt for a word WORD to search for in all dictionaries. +Presents the selection or word at point as default input. + +With prefix argument DICTIONARY, prompt for a dictionary and +restrict the search to only that one." (interactive (let ((dict (if current-prefix-arg