From 63d42c97bc7c1a76b4bc16bef0114dd357bd3eeb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 3 Jan 2020 05:14:53 -0500 Subject: [PATCH] Pass POS to sp-point-in-string And doom-point-in-string-or-comment-p is no longer side-effect-free, due to sp-point-in-* caching syntax-ppss. --- core/autoload/text.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/autoload/text.el b/core/autoload/text.el index 623fc3cea..5f33f468b 100644 --- a/core/autoload/text.el +++ b/core/autoload/text.el @@ -51,12 +51,11 @@ POS defaults to the current position." ;; REVIEW Should we cache `syntax-ppss'? (let ((pos (or pos (point)))) (or (run-hook-with-args-until-success 'doom-point-in-string-functions pos) - (sp-point-in-string)))) + (sp-point-in-string pos)))) ;;;###autoload (defun doom-point-in-string-or-comment-p (&optional pos) "Return non-nil if POS is in a string or comment." - (declare (side-effect-free t)) (or (doom-point-in-string-p pos) (doom-point-in-comment-p pos)))