branch: externals/phpinspect commit 0ca527dbbd3ef4b6826dc63c41a8543cf2e98664 Author: Hugo Thunnissen <de...@hugot.nl> Commit: Hugo Thunnissen <de...@hugot.nl>
Adapt `phpinspect-purge-parser-cache' to new parser caching approach --- phpinspect-parser.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpinspect-parser.el b/phpinspect-parser.el index e41bc8503c..dcec0cb101 100644 --- a/phpinspect-parser.el +++ b/phpinspect-parser.el @@ -351,14 +351,14 @@ parser function is then returned in byte-compiled form." (phpinspect-parser-compile (symbol-value parser-symbol)))))) (defun phpinspect-purge-parser-cache () - "Empty `phpinspect-parser-obarray`. + "Unset functions in `phpinspect-parser-obarray`. This is useful when you need to change parser handlers or parsers during runtime. Parsers are implemented with macros, so changing handler functions without calling this function will often not have any effect." (interactive) - (setq phpinspect-parser-obarray (obarray-make))) + (obarray-map #'fmakunbound phpinspect-parser-obarray)) (defun phpinspect-make-parser-function (tree-type handler-list &optional delimiter-predicate) "Create a parser function using the handlers by names defined in HANDLER-LIST.