From ae3acbdbe13f3b6cae4c968b56b33aa1d0d96566 Mon Sep 17 00:00:00 2001 From: Hugo Thunnissen Date: Sat, 5 Nov 2022 00:31:19 +0100 Subject: [PATCH] Disable auto-reindexing by default --- phpinspect.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/phpinspect.el b/phpinspect.el index fb1b590..fadc7a0 100644 --- a/phpinspect.el +++ b/phpinspect.el @@ -42,6 +42,11 @@ (require 'phpinspect-imports) (require 'phpinspect-buffer) +(defvar phpinspect-auto-reindex nil + "Whether or not phpinspect should automatically search for new +files. The current implementation is clumsy and can result in +serious performance hits. Enable at your own risk (:") + (defvar-local phpinspect--buffer-index nil "The result of the last successfull parse + index action executed by phpinspect for the current buffer") @@ -1211,7 +1216,7 @@ before the search is executed." ;; Index new files and try again if not done already. (if (eq index-new 'index-new) nil - (progn + (when phpinspect-auto-reindex (phpinspect--log "Failed finding filepath for type %s. Retrying with reindex." (phpinspect--type-name class)) (phpinspect-get-class-filepath class 'index-new)))