From 11676b01537bb445defe8dfe34ea9c637cae0d72 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 3 Jan 2020 05:20:45 -0500 Subject: [PATCH] Fix #2299: void-function sp-point-in-string during 'doom refresh' Due to use of third-party code before it is installed. Since we can be sure that elisp has a sane syntax-table we do not need sophisticated comment/string detection. --- core/cli/autoloads.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/cli/autoloads.el b/core/cli/autoloads.el index 33b0261eb..2a92ead24 100644 --- a/core/cli/autoloads.el +++ b/core/cli/autoloads.el @@ -226,8 +226,11 @@ one wants that.") ;; `load-file-name' is meaningless in a concatenated ;; mega-autoloads file, so we replace references to it with the ;; file they came from. - (unless (doom-point-in-string-or-comment-p) - (replace-match filestr t t))))) + (or (save-excursion + (let ((ppss (syntax-ppss))) + (or (nth 3 ppss) + (nth 4 ppss)))) + (replace-match filestr t t))))) (let ((load-file-name file) (load-path (append (list doom-private-dir)