[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Checking if cursor is inside a comment
From: |
Nordlöw |
Subject: |
Checking if cursor is inside a comment |
Date: |
Fri, 18 Jul 2008 00:10:38 -0700 (PDT) |
User-agent: |
G2/1.0 |
Is there a general or mode-specific (c-mode for my application) way of
checking whether the cursor is currently placed inside a comment or
not? What is the most clever way of doing this? Should I use looking-
at(), use or perhaps extend thing-at-point(), or use search-forward/
backward() or is there some other state or function that should be
used for this specific case. I believe c-mode has some variables and
functions for accessing the result of its parsing, for example c-
syntactic-information-on-region().
My main reason for asking is that I have a lot of clever code helpers
especially for c-mode that I don't want to be enable inside comments.
Thanks in advance,
Nordlöw
- Checking if cursor is inside a comment,
Nordlöw <=