From: No Wayman <iarchivedmywholelife@gmail.com>
To: emacs-devel@gnu.org
Subject: [PATCH] dictonary.el documentation
Date: Tue, 23 Jan 2024 10:31:47 -0500 [thread overview]
Message-ID: <8734uof4m4.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 652 bytes --]
I've attached a patch for what I think are a few improvements to
dictionary.el's documentation.
There are still a handful of undocumented functions/commands.
The commentary section also redirects to an external source, which
is not very helpful:
;; You can find more information in the README file of the GitHub
;; repository https://github.com/myrkr/dictionary-el
I bumped into all this when trying out dictionary-tooltip-mode.
I thought "oh, cool", enabled the mode, then...nothing happened.
That's due to the dictionary-tooltip-dictionary defaulting to nil.
Perhaps this user option could default to
dictionary-default-dictionary instead.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: dictionary.el docs --]
[-- Type: text/x-patch, Size: 3022 bytes --]
From 02c4f83176ab9fb1afdb3962f9b90023961ebaaa Mon Sep 17 00:00:00 2001
From: Nicholas Vollmer <iarchivedmywholelife@gmail.com>
Date: Tue, 23 Jan 2024 09:39:02 -0500
Subject: [PATCH] * lisp/net/dictionary.el: satisfy checkdoc
(dictionary-tool-bar-map): add missing period
(dictionary-process-popup-replies),
(dictionary-read-definition),
(dictionary-display-tooltip): rename ignored parameters
(dictionary-tooltip-track-mouse): describe what function does, not just when
(dictionary-switch-tooltip-mode): reword docstring in terms of ON parameter
---
lisp/net/dictionary.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el
index 1981b757017..4f4710a2920 100644
--- a/lisp/net/dictionary.el
+++ b/lisp/net/dictionary.el
@@ -461,7 +461,7 @@ dictionary-tool-bar-map
:vert-only t
:help "Go backwards in history.")
map)
- "Like the default `tool-bar-map', but with additions for Dictionary mode")
+ "Like the default `tool-bar-map', but with additions for Dictionary mode.")
;;;###autoload
(define-derived-mode dictionary-mode special-mode "Dictionary"
@@ -1316,7 +1316,7 @@ dictionary-popup-matching-words
dictionary-default-popup-strategy
'dictionary-process-popup-replies))
-(defun dictionary-process-popup-replies (&ignore)
+(defun dictionary-process-popup-replies (_)
(let ((list (dictionary-simple-split-string (dictionary-read-answer) "\n+")))
(let ((result (mapcar (lambda (item)
@@ -1360,7 +1360,7 @@ dictionary-definition
(dictionary-do-search word dictionary 'dictionary-read-definition t))
nil))
-(defun dictionary-read-definition (&ignore)
+(defun dictionary-read-definition (_)
(let ((list (dictionary-simple-split-string (dictionary-read-answer) "\n+")))
(mapconcat #'identity (cdr list) "\n")))
@@ -1381,7 +1381,7 @@ dictionary-word-at-mouse-event
(defvar dictionary-tooltip-mouse-event nil
"Event that triggered the tooltip mode.")
-(defun dictionary-display-tooltip (&ignore)
+(defun dictionary-display-tooltip (_)
"Search the current word in the `dictionary-tooltip-dictionary'."
(interactive "e")
(if (and dictionary-tooltip-mode dictionary-tooltip-dictionary)
@@ -1396,7 +1396,7 @@ dictionary-display-tooltip
nil))
(defun dictionary-tooltip-track-mouse (event)
- "Called whenever a dictionary tooltip display is about to be triggered."
+ "Hide current tooltip and setup next tooltip in response to mouse movement EVENT."
(interactive "e")
(tooltip-hide)
(when dictionary-tooltip-mode
@@ -1404,7 +1404,7 @@ dictionary-tooltip-track-mouse
(tooltip-start-delayed-tip)))
(defun dictionary-switch-tooltip-mode (on)
- "Turn off or on support for the dictionary tooltip mode.
+ "Turn dictionary tooltip mode off or ON.
It is normally internally called with 1 to enable support for the
tooltip mode. The hook function will check the value of the
--
2.43.0
next reply other threads:[~2024-01-23 15:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 15:31 No Wayman [this message]
2024-01-23 17:14 ` [PATCH] dictonary.el documentation Philip Kaludercic
2024-01-24 4:33 ` Emanuel Berg
2024-01-25 23:33 ` Stefan Kangas
2024-01-24 10:15 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8734uof4m4.fsf@gmail.com \
--to=iarchivedmywholelife@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).