[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phpinspect e067a9e9dd 122/126: Remove obsolete function
From: |
ELPA Syncer |
Subject: |
[elpa] externals/phpinspect e067a9e9dd 122/126: Remove obsolete function and add some documentation to mode doc string |
Date: |
Sat, 12 Aug 2023 00:58:54 -0400 (EDT) |
branch: externals/phpinspect
commit e067a9e9dd0d130be928a477fa7f48a86463faf3
Author: Hugo Thunnissen <devel@hugot.nl>
Commit: Hugo Thunnissen <devel@hugot.nl>
Remove obsolete function and add some documentation to mode doc string
---
phpinspect.el | 50 +++++++++++++++++++++++++++++++++++++-------------
1 file changed, 37 insertions(+), 13 deletions(-)
diff --git a/phpinspect.el b/phpinspect.el
index e95cd81be3..349c7c8d38 100644
--- a/phpinspect.el
+++ b/phpinspect.el
@@ -115,12 +115,7 @@
(defun phpinspect--after-save-action ()
"This is intended to be run every time a phpinspect buffer is saved.
-It indexes the entire buffer and updates
-`phpinspect--buffer-index'. The buffer index is merged into the
-project-wide index (stored in `phpinspect-cache') afterwards.
-Assuming that files are only changed from within Emacs, this
-keeps the cache valid. If changes are made outside of Emacs,
-users will have to use \\[phpinspect-purge-cache]."
+Reparses the entire buffer without token reuse."
(when (and (boundp 'phpinspect-mode) phpinspect-mode)
(phpinspect-buffer-reparse phpinspect-current-buffer)))
@@ -128,7 +123,6 @@ users will have to use \\[phpinspect-purge-cache]."
"Clean up the buffer environment for the mode to be disabled."
(setq phpinspect-current-buffer nil)
(kill-local-variable 'phpinspect--buffer-project)
- (kill-local-variable 'phpinspect--buffer-index)
(kill-local-variable 'company-backends)
(kill-local-variable 'eldoc-documentation-function)
(kill-local-variable 'eldoc-message-commands))
@@ -152,8 +146,13 @@ To initially index a project, use M-x
`phpinspect-index-current-project'
in a buffer of one of the project files. Project root is detected with
`phpinspect-project-root-file-list'.
-For completion see the company-mode backend:
-`phpinspect-company-backend'.
+For completion see `phpinspect-complete-at-point' which is
+automatically added to `completion-at-point-functions' when
+phpinspect-mode is activated.
+
+For company users, there is also
+`phpinspect-company-backend'. This is automatically added to
+`company-backends' when company is detected.
For eldoc see `phpinspect-eldoc-function'.
@@ -165,7 +164,35 @@ To automatically add missing use statements for used
classes to a
visited file, use `phpinspect-fix-imports'
(bound to \\[phpinspect-fix-imports]].)
-Example configuration:
+By default, phpinspect looks for a composer.json file that can be
+used to get autoload information for the classes that are present
+in your project. It is also possible to index an entire directory
+by adding it as an include dir. To do this, use
+\\[phpinspect-project-add-include-dir]. Include directories can
+be edited at all times using \\[customize-group] RET phpinspect.
+
+Example configuration if you already have a completion
+UI (Company, Corfu) setup that can take advantage of completion
+at point (capf) functions:
+
+(defun my-php-personal-hook ()
+ ;; Shortcut to add use statements for classes you use.
+ (define-key php-mode-map (kbd \"C-c u\") 'phpinspect-fix-imports)
+
+ ;; Shortcuts to quickly search/open files of PHP classes.
+ ;; You can make these local to php-mode, but making them global
+ ;; like this makes them work in other modes/filetypes as well, which
+ ;; can be handy when jumping between templates, config files and PHP code.
+ (global-set-key (kbd \"C-c a\") 'phpinspect-find-class-file)
+ (global-set-key (kbd \"C-c c\") 'phpinspect-find-own-class-file)
+
+ ;; Enable phpinspect-mode
+ (phpinspect-mode))
+
+(add-hook 'php-mode-hook #'my-php-personal-hook)
+
+
+Example configuration for `company-mode':
(defun my-php-personal-hook ()
;; Assuming you already have company-mode enabled, these settings
@@ -201,9 +228,6 @@ Example configuration:
;; End example configuration."
:after-hook (phpinspect--mode-function))
-(defun phpinspect--buffer-index (buffer)
- (with-current-buffer buffer phpinspect--buffer-index))
-
(defun phpinspect--suggest-at-point ()
(phpinspect--log "Entering suggest at point. Point: %d" (point))
(phpinspect-completion-query-execute
- [elpa] externals/phpinspect df821c4039 023/126: Add ticket tracker link to README, (continued)
- [elpa] externals/phpinspect df821c4039 023/126: Add ticket tracker link to README, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 9f7931a7b6 100/126: Rework parser for ahead of time byte compilation, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 9513cbc917 125/126: Update README, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect e35caa7e15 118/126: Fix a variety of bugs, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect f7d88a90f4 009/126: Implement some general tests for the parser code, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 74bd0ad434 032/126: WIP: New data type for cached classes, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 3a3e2cd362 042/126: Update README with new development repository location, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 0bc9e795b2 043/126: Fix tests and patch bugs that came to light in the process, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect f030a685d2 060/126: Alter interpret-expression-type to interpret array-member assignment, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 8cd4dc2025 058/126: Remove commented code + tidy some formatting, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect e067a9e9dd 122/126: Remove obsolete function and add some documentation to mode doc string,
ELPA Syncer <=
- [elpa] externals/phpinspect 5fe0b7bdc5 123/126: Add .cask directory to gitignore, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 15c175dc61 016/126: Only attempt to byte compile when the handler isn't already compiled, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect dbbc5927e4 022/126: Enable company-mode before changing its variables in README example, ELPA Syncer, 2023/08/12