From: Peter Tury <tury.peter@gmail.com>
Subject: identifiing strings and comments in program source files (to skip them over)
Date: Tue, 25 Apr 2006 23:14:34 +0200 [thread overview]
Message-ID: <11laoqnlgqlxp.80dh81qx3xik.dlg@40tude.net> (raw)
Hi,
isn't it a good idea to use the face property (get-text-property (point)
'face) to decide if the point is after a string or comment?
I have a mode what uses font-lock-mode and highlights everything nicely. I
think I could use this (= the face set by font-lock-mode) for identifiing
if e.g. a search stopped in a string or comment. (I know font-lock-mode
must be enabled for this.) This way I could omit reparsing the buffer (with
parse-partial-sexp) e.g. in a function what searches something "real" (=
strings and comments should be skipped).
What do you think: can a robust solution be built using this approach?
Thanks,
P
next reply other threads:[~2006-04-25 21:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-25 21:14 Peter Tury [this message]
2006-04-26 3:53 ` identifiing strings and comments in program source files (to skip them over) Thien-Thi Nguyen
2006-04-26 8:04 ` Peter Tury
2006-04-26 6:01 ` Stefan Monnier
2006-04-26 8:06 ` Peter Tury
-- strict thread matches above, loose matches on Subject: below --
2006-04-26 6:38 martin rudalics
[not found] <mailman.964.1146057880.9609.help-gnu-emacs@gnu.org>
2006-04-26 19:05 ` Peter Tury
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11laoqnlgqlxp.80dh81qx3xik.dlg@40tude.net \
--to=tury.peter@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.