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

    Add explanatory comment in phpinspect-buffer.el
---
 phpinspect-buffer.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/phpinspect-buffer.el b/phpinspect-buffer.el
index 515fae3485..2d4e54d209 100644
--- a/phpinspect-buffer.el
+++ b/phpinspect-buffer.el
@@ -299,6 +299,10 @@ linked with."
           (dolist (deleted deleted-classes)
             (if (and (setq class (phpinspect-buffer-get-index-for-token
                                   buffer (phpinspect-meta-token deleted)))
+                     ;; If we can find a declaration in the buffer that is 
equal
+                     ;; to the deleted declaration, the class has just been
+                     ;; edited in a way were the declaration ended up getting
+                     ;; reparsed. No need to delete it from the index
                      (setq replaced (assoc (phpi-typedef-declaration class) 
new-declarations #'equal)))
                 (pcase-let ((`(,imports ,namespace-name) 
(phpinspect-get-token-index-context namespaces buffer-imports (cdr replaced))))
                   (phpinspect-buffer-update-index-reference-for-token

Reply via email to