[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/integration-of-dictionary-el cc5f280 02/17: * lisp/net/dictionar
From: |
Torsten Hilbrich |
Subject: |
feature/integration-of-dictionary-el cc5f280 02/17: * lisp/net/dictionary.el: Add lexical-binding:t |
Date: |
Mon, 14 Dec 2020 05:46:36 -0500 (EST) |
branch: feature/integration-of-dictionary-el
commit cc5f2803785c5dc785f09a292313cf799e8d29bb
Author: Torsten Hilbrich <torsten.hilbrich@gmx.net>
Commit: Torsten Hilbrich <torsten.hilbrich@gmx.net>
* lisp/net/dictionary.el: Add lexical-binding:t
Fixing all the issues found by this. A number of unused variables were
reported here.
---
lisp/net/dictionary.el | 39 ++++++++++++++++++---------------------
1 file changed, 18 insertions(+), 21 deletions(-)
diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el
index 6eb8475..65ed7d2 100644
--- a/lisp/net/dictionary.el
+++ b/lisp/net/dictionary.el
@@ -1,4 +1,4 @@
-;;; dictionary.el --- Client for rfc2229 dictionary servers
+;;; dictionary.el --- Client for rfc2229 dictionary servers -*-
lexical-binding:t -*-
;; Author: Torsten Hilbrich <torsten.hilbrich@gmx.net>
;; Keywords: interface, dictionary
@@ -416,7 +416,7 @@ is utf-8"
(dictionary-store-positions)
(dictionary-store-state 'dictionary-new-buffer nil)))
-(defun dictionary-new-buffer (&rest ignore)
+(defun dictionary-new-buffer ()
"Create a new and clean buffer"
(dictionary-pre-buffer)
@@ -513,7 +513,7 @@ is utf-8"
;; Dealing with closing the buffer
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun dictionary-close (&rest ignore)
+(defun dictionary-close ()
"Close the current dictionary buffer and its connection"
(interactive)
(if (eq major-mode 'dictionary-mode)
@@ -777,13 +777,13 @@ This function knows about the special meaning of quotes
(\")"
(dictionary (nth 2 reply-list))
(description (nth 3 reply-list))
(word (nth 1 reply-list)))
- (dictionary-display-word-entry word dictionary description)
+ (dictionary-display-word-entry dictionary description)
(setq reply (dictionary-read-answer))
(dictionary-display-word-definition reply word dictionary)
(setq reply (dictionary-read-reply-and-split))))
(dictionary-post-buffer)))
-(defun dictionary-display-word-entry (word dictionary description)
+(defun dictionary-display-word-entry (dictionary description)
"Insert an explanation for the current definition."
(let ((start (point)))
(insert "From "
@@ -857,7 +857,7 @@ The word is taken from the buffer, the `dictionary' is
given as argument."
(unless (dictionary-check-reply reply 110)
(error "Unknown server answer: %s"
(dictionary-reply reply)))
- (dictionary-display-dictionarys reply))))
+ (dictionary-display-dictionarys))))
(defun dictionary-simple-split-string (string &optional pattern)
"Return a list of substrings of STRING which are separated by PATTERN.
@@ -872,7 +872,7 @@ If PATTERN is omitted, it defaults to \"[
\\f\\t\\n\\r\\v]+\"."
start (match-end 0)))
(nreverse (cons (substring string start) parts))))
-(defun dictionary-display-dictionarys (reply)
+(defun dictionary-display-dictionarys ()
"Handle the display of all dictionaries existing on the server"
(dictionary-pre-buffer)
(insert "Please select your default dictionary:\n\n")
@@ -969,9 +969,9 @@ If PATTERN is omitted, it defaults to \"[
\\f\\t\\n\\r\\v]+\"."
(unless (dictionary-check-reply reply 111)
(error "Unknown server answer: %s"
(dictionary-reply reply)))
- (dictionary-display-strategies reply))))
+ (dictionary-display-strategies))))
-(defun dictionary-display-strategies (reply)
+(defun dictionary-display-strategies ()
"Handle the display of all strategies existing on the server"
(dictionary-pre-buffer)
(insert "Please select your default search strategy:\n\n")
@@ -1186,9 +1186,8 @@ It presents the word at point as default input and allows
editing it."
dictionary-default-popup-strategy
'dictionary-process-popup-replies))
-(defun dictionary-process-popup-replies (reply)
- (let ((number (nth 1 (dictionary-reply-list reply)))
- (list (dictionary-simple-split-string (dictionary-read-answer) "\n+")))
+(defun dictionary-process-popup-replies (&ignore)
+ (let ((list (dictionary-simple-split-string (dictionary-read-answer) "\n+")))
(let ((result (mapcar (lambda (item)
(let* ((list (dictionary-split-string item))
@@ -1204,13 +1203,11 @@ It presents the word at point as default input and
allows editing it."
t ))))
list)))
- (let ((menu (make-sparse-keymap 'dictionary-popup)))
-
- (easy-menu-define dictionary-mode-map-menu dictionary-mode-map
- "Menu used for displaying dictionary popup"
- (cons "Matching words"
- `(,@result)))
- (popup-menu dictionary-mode-map-menu)))))
+ (easy-menu-define dictionary-mode-map-menu dictionary-mode-map
+ "Menu used for displaying dictionary popup"
+ (cons "Matching words"
+ `(,@result)))
+ (popup-menu dictionary-mode-map-menu))))
;;; Tooltip support
@@ -1234,7 +1231,7 @@ It presents the word at point as default input and allows
editing it."
(dictionary-do-search word dictionary 'dictionary-read-definition t))
nil))
-(defun dictionary-read-definition (reply)
+(defun dictionary-read-definition (&ignore)
(let ((list (dictionary-simple-split-string (dictionary-read-answer) "\n+")))
(mapconcat 'identity (cdr list) "\n")))
@@ -1255,7 +1252,7 @@ It presents the word at point as default input and allows
editing it."
(defvar dictionary-tooltip-mouse-event nil
"Event that triggered the tooltip mode")
-(defun dictionary-display-tooltip (event)
+(defun dictionary-display-tooltip (&ignore)
"Search the current word in the `dictionary-tooltip-dictionary'."
(interactive "e")
(if (and dictionary-tooltip-mode dictionary-tooltip-dictionary)
- feature/integration-of-dictionary-el updated (7ca331a -> 62d14e1), Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el a25a12d 12/17: Use when where else case returns nil, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el ffa7d66 09/17: * lisp/net/dictionary.el: Prefer defsubst over defmacro, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el a557a10 08/17: * lisp/net/dictionary-connection.el: Prefer defsubst, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el f584437 06/17: * lisp/net/dictionary-connection.el: Remove obsolete Version, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el 54a3964 07/17: Update GPL version, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el d5a4da2 01/17: * lisp/net/dictionary.el: Remove remnants of package, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el cc5f280 02/17: * lisp/net/dictionary.el: Add lexical-binding:t,
Torsten Hilbrich <=
- feature/integration-of-dictionary-el 81ebe86 04/17: Show error message when asking to match for nothing, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el 09952ce 03/17: Removed useless check for popup-menu, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el 4deb861 10/17: * lisp/net/dictionary.el (dictionary-mode): Use setq-local, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el 0044a2e 05/17: * lisp/net/dictionary-connection.el: Add lexical-binding:t, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el ca0de4d 16/17: * etc/NEWS: Add entry for dictionary.el, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el 62d14e1 17/17: * lisp/net/dictionary.el (dictionary-pre-buffer): Unify casing, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el 89e9c16 13/17: * lisp/net/dictionary.el (dictionary-display-more-info): Spelling fix, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el d466231 14/17: A number of docstring fixes, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el d30618c 11/17: * lisp/net/dictionary.el (dictionary-tooltip-mode): Use setq-local, Torsten Hilbrich, 2020/12/14
- feature/integration-of-dictionary-el b18217e 15/17: A number of docstring fixes, Torsten Hilbrich, 2020/12/14