branch: externals/phpinspect
commit fbfcf4f928e6d4691b72e62b541ed3d4998d2ef5
Author: Hugo Thunnissen <de...@hugot.nl>
Commit: Hugo Thunnissen <de...@hugot.nl>

    Fix byte compilation warnings
---
 phpinspect-eldoc.el   | 1 +
 phpinspect-imports.el | 4 ++--
 phpinspect-project.el | 6 ++----
 phpinspect-suggest.el | 3 +--
 phpinspect.el         | 8 +++++++-
 5 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/phpinspect-eldoc.el b/phpinspect-eldoc.el
index d0ac7f4272..8efa9b7e72 100644
--- a/phpinspect-eldoc.el
+++ b/phpinspect-eldoc.el
@@ -25,6 +25,7 @@
 (require 'phpinspect-util)
 (require 'phpinspect-meta)
 (require 'phpinspect-parser)
+(require 'phpinspect-resolve)
 
 (defvar phpinspect-eldoc-word-width 14
   "The maximum width of words in eldoc strings.")
diff --git a/phpinspect-imports.el b/phpinspect-imports.el
index 8aad8ee3f7..5462f31299 100644
--- a/phpinspect-imports.el
+++ b/phpinspect-imports.el
@@ -120,7 +120,7 @@ buffer position to insert the use statement at."
       ""))
 
 (defun phpinspect-add-use-statements-for-missing-types (types buffer imports 
project parent-token)
-  (let (namespace)
+  (let (namespace namespace-name)
     (dolist (type types)
       (setq namespace (phpinspect-meta-find-parent-matching-token
                        parent-token #'phpinspect-namespace-p)
@@ -159,7 +159,7 @@ that there are import (\"use\") statements for them."
                  (used-types (alist-get 'used-types class))
                  (class-name (alist-get 'class-name class))
                  (region (alist-get 'location class))
-                 token-meta namespace)
+                 token-meta)
             (message "Region: %s" region)
             (message "index: %s" index)
             (setq token-meta (phpinspect-meta-find-parent-matching-token
diff --git a/phpinspect-project.el b/phpinspect-project.el
index ef7e328db8..0df08d9821 100644
--- a/phpinspect-project.el
+++ b/phpinspect-project.el
@@ -279,14 +279,12 @@ before the search is executed."
        (phpinspect-project-worker project)
        (phpinspect-make-index-dir-task :dir dir :project project)))))
 
-(defgroup phpinspect '((phpinspect-projects custom-variable))
-  "PHPInspect Configuration")
-
 (defcustom phpinspect-projects nil
   "PHPInspect Projects."
   :type '(alist :key-type string
                 :value-type (alist :key-type symbol
-                                   :options ((include-dirs (repeat string))))))
+                                   :options ((include-dirs (repeat string)))))
+  :group 'phpinspect)
 
 (defun phpinspect-project-add-include-dir (dir)
   "Configure DIR as an include dir for the current project."
diff --git a/phpinspect-suggest.el b/phpinspect-suggest.el
index 98c8fd6463..aff9c81312 100644
--- a/phpinspect-suggest.el
+++ b/phpinspect-suggest.el
@@ -31,8 +31,7 @@
 (require 'phpinspect-class)
 
 (defun phpinspect-suggest-functions (rctx)
-  (let* ((project (phpinspect--resolvecontext-project rctx))
-         (word (cadr (car (last (phpinspect--resolvecontext-subject rctx))))))
+  (let* ((project (phpinspect--resolvecontext-project rctx)))
     (phpinspect-project-get-functions project)))
 
 (defun phpinspect-suggest-variables-at-point (resolvecontext)
diff --git a/phpinspect.el b/phpinspect.el
index bfd7346301..7dfcdee93e 100644
--- a/phpinspect.el
+++ b/phpinspect.el
@@ -134,6 +134,12 @@ users will have to use \\[phpinspect-purge-cache]."
       (phpinspect--init-mode)
     (phpinspect--disable-mode)))
 
+(defgroup phpinspect '((phpinspect-projects custom-variable))
+  "PHPInspect, PHP code intelligence and completion"
+  :group 'programming
+  :group 'php
+  :link '(function-link phpinspect-mode))
+
 (define-minor-mode phpinspect-mode
   "A minor mode for intelligent completion for and interaction
 with PHP files.
@@ -189,7 +195,7 @@ Example configuration:
   (add-hook 'php-mode-hook #'my-php-personal-hook)
 
 ;; End example configuration."
-    :after-hook (phpinspect--mode-function))
+  :after-hook (phpinspect--mode-function))
 
 (defun phpinspect--buffer-index (buffer)
   (with-current-buffer buffer phpinspect--buffer-index))

Reply via email to