emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/javaimp 8f38c94: Cosmetic patch


From: Filipp Gunbin
Subject: [elpa] externals/javaimp 8f38c94: Cosmetic patch
Date: Tue, 15 Jun 2021 13:50:48 -0400 (EDT)

branch: externals/javaimp
commit 8f38c94daaa26caf0875a3b7017f43b8841fbbf3
Author: Filipp Gunbin <fgunbin@fastmail.fm>
Commit: Filipp Gunbin <fgunbin@fastmail.fm>

    Cosmetic patch
    
    * Remove redundand :group of defcustoms.
    * Mark unused function arguments as such.
    
    Suggested by Stefan Monnier <monnier@iro.umontreal.ca>.
---
 javaimp-parse.el | 19 +++++++++++--------
 javaimp-util.el  |  5 +++--
 javaimp.el       |  7 -------
 3 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/javaimp-parse.el b/javaimp-parse.el
index f2f9177..53decbe 100644
--- a/javaimp-parse.el
+++ b/javaimp-parse.el
@@ -21,6 +21,7 @@
 (require 'cl-lib)
 (require 'seq)
 (require 'cc-mode)                      ;for java-mode-syntax-table
+(require 'javaimp-util)
 
 (defcustom javaimp-parse-format-method-name
   #'javaimp--parse-format-method-name-full
@@ -73,9 +74,10 @@ non-nil, then name parsing is skipped."
                      (not (bobp)))
               (push (javaimp--parse-arglist-one-arg only-type) res)
               ;; move back to the previous argument, if any
-              (when (javaimp--parse-skip-back-until (lambda (last-what 
last-pos)
-                                                      (and (not (bobp))
-                                                           (= (char-before) 
?,))))
+              (when (javaimp--parse-skip-back-until
+                     (lambda (_last-what _last-pos)
+                       (and (not (bobp))
+                            (= (char-before) ?,))))
                 (backward-char)))       ; skip comma
             res))))))
 
@@ -98,10 +100,11 @@ skipping further backwards is done by the caller."
     ;; Parse type: allow anything, but stop at the word boundary which
     ;; is not inside list (this is presumably the type start..)
     (if-let ((last-skip
-              (javaimp--parse-skip-back-until (lambda (last-what last-pos)
-                                                (save-excursion
-                                                  (if last-pos (goto-char 
last-pos))
-                                                  (looking-at "\\_<"))))))
+              (javaimp--parse-skip-back-until
+               (lambda (_last-what last-pos)
+                 (save-excursion
+                   (if last-pos (goto-char last-pos))
+                   (looking-at "\\_<"))))))
         (progn
           (unless (eq last-skip t)
             (goto-char (cdr last-skip))) ;undo skipping by ..-until
@@ -208,7 +211,7 @@ parsing failed and should not be continued."
                       (mapconcat #'car throws-args ", ")))
           ))
 
-(defsubst javaimp--parse-format-method-name-types (name args throws-args)
+(defsubst javaimp--parse-format-method-name-types (name args _throws-args)
   "Outputs NAME and ARGS (only type)."
   (concat name
           "("
diff --git a/javaimp-util.el b/javaimp-util.el
index 1172ef2..0231f17 100644
--- a/javaimp-util.el
+++ b/javaimp-util.el
@@ -145,9 +145,10 @@ point is outside of any context initially."
   (or count (setq count 1))
   (let ((step (if (>= count 0) 1 -1))
         res)
-    (dotimes (iter (abs count) res)
+    (dotimes (_ (abs count))
       (while (and (setq res (re-search-backward regexp bound noerror step))
-                  (syntax-ppss-context (syntax-ppss)))))))
+                  (syntax-ppss-context (syntax-ppss)))))
+    res))
 
 
 
diff --git a/javaimp.el b/javaimp.el
index 9aeae61..8309d50 100644
--- a/javaimp.el
+++ b/javaimp.el
@@ -100,20 +100,17 @@ class name.  Lowest-order groups are placed earlier.
 
 The order of classes which were not matched is defined by
 `javaimp-import-default-order'."
-  :group 'javaimp
   :type '(alist :key-type string :value-type integer))
 
 (defcustom javaimp-import-default-order 50
   "Defines the order of classes which were not matched by
 `javaimp-import-group-alist'"
-  :group 'javaimp
   :type 'integer)
 
 (defcustom javaimp-java-home (getenv "JAVA_HOME")
   "Path to the JDK.  Should contain subdirectory
 \"jre/lib\" (pre-JDK9) or just \"lib\".  By default, it is
 initialized from the JAVA_HOME environment variable."
-  :group 'javaimp
   :type 'string)
 
 (defcustom javaimp-additional-source-dirs nil
@@ -132,19 +129,16 @@ of the leading slash.
 
 Custom values set in plugin configuration in pom.xml are not
 supported yet."
-  :group 'javaimp
   :type '(repeat (string :tag "Relative directory")))
 
 (defcustom javaimp-jar-program "jar"
   "Path to the `jar' program used to read contents of jar files.
 Customize it if the program is not on `exec-path'."
-  :group 'javaimp
   :type 'string)
 
 (defcustom javaimp-jmod-program "jmod"
   "Path to the `jmod' program used to read contents of jmod files.
 Customize it if the program is not on `exec-path'."
-  :group 'javaimp
   :type 'string)
 
 (defcustom javaimp-include-current-module-classes t
@@ -152,7 +146,6 @@ Customize it if the program is not on `exec-path'."
 completion alternatives.  `javaimp-add-import' will find all java
 files in the current project and add their fully-qualified names
 to the completion alternatives list."
-  :group 'javaimp
   :type 'boolean)
 
 



reply via email to

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