Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Search forward first regexp not inside a comment.

View re-search-forward-not-in-comment.el
1 2 3 4 5
(defun re-search-forward-not-in-comment (regexp)
"Search forward first regexp not inside a comment. "
(interactive
(list (read-from-minibuffer "Regexp: ")))
(while (and (re-search-forward regexp nil t 1)(or (and (nth 8 (syntax-ppss))(nth 3 (syntax-ppss)))(and (nth 8 (syntax-ppss))(nth 4 (syntax-ppss)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.