emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master d3dae88e6cc 3/3: Improve dictionary-mode documentation


From: Stefan Kangas
Subject: master d3dae88e6cc 3/3: Improve dictionary-mode documentation
Date: Sat, 12 Aug 2023 10:53:13 -0400 (EDT)

branch: master
commit d3dae88e6cc8118c875957ba0347be9599014b34
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    Improve dictionary-mode documentation
    
    * lisp/net/dictionary.el (dictionary-mode): Improve docstring
---
 lisp/net/dictionary.el | 41 +++++++++++++++++++++++------------------
 1 file changed, 23 insertions(+), 18 deletions(-)

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-mode-map>
-* \\[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 \\`<mouse-2>' 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
+ \\`<mouse-2>' 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]