Skip to content

Instantly share code, notes, and snippets.

@hober
Created October 15, 2010 20:31
Show Gist options
  • Save hober/628898 to your computer and use it in GitHub Desktop.
Save hober/628898 to your computer and use it in GitHub Desktop.
(defun mtucker-mark-comment (&optional pos)
(interactive "d")
(let ((initial pos)
(syntax (syntax-ppss pos)))
(if (nth 4 syntax)
(progn
(push-mark (nth 8 syntax) nil t)
(while (nth 4 syntax)
(forward-char)
(setq syntax (syntax-ppss (point)))))
(message "Not in a comment."))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment