From 3aa08da7a151f1928bf0e3d12fc2443b6485b6ef Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Sun, 25 Sep 2022 15:06:36 -0700 Subject: Ignore comments when narrowing to defun Closes #287 --- helpful.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helpful.el b/helpful.el index b7f23f4..62b3782 100644 --- a/helpful.el +++ b/helpful.el @@ -1248,7 +1248,8 @@ If the source code cannot be found, return the sexp used." (forward-char) (narrow-to-region pos (point))) ;; Narrow to the top-level definition. - (narrow-to-defun t)) + (let ((parse-sexp-ignore-comments t)) + (narrow-to-defun t))) ;; If there was a preceding comment, POS will be ;; after that comment. Move the position to include that comment. -- cgit v1.0