Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions puni.el
Original file line number Diff line number Diff line change
Expand Up @@ -919,13 +919,23 @@ hit the ending quote), return nil.

Notice that a point inside the (multichar) quote is not
considered as in the comment."
(puni--strict-primitive-forward-sexp-in-thing #'puni--in-comment-p
"comment"))
;; Binding `parse-sexp-ignore-comments' is necessary because it is
;; buffer-locally set to t in prog-mode.el.
(let ((parse-sexp-ignore-comments nil))
(puni--strict-primitive-forward-sexp-in-thing (lambda ()
(save-excursion
(skip-syntax-forward "-")
(puni--in-comment-p)))
"comment")))

(defun puni-strict-backward-sexp-in-comment ()
"Backward version of `puni-strict-forward-sexp-in-comment'."
(puni--strict-primitive-backward-sexp-in-thing #'puni--in-comment-p
"comment"))
(let ((parse-sexp-ignore-comments nil))
(puni--strict-primitive-backward-sexp-in-thing (lambda ()
(save-excursion
(skip-syntax-forward "-")
(puni--in-comment-p)))
"comment")))

;;;;; Indent

Expand Down
Loading