help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

identifiing strings and comments in program source files (to skip them o


From: Peter Tury
Subject: identifiing strings and comments in program source files (to skip them over)
Date: Tue, 25 Apr 2006 23:14:34 +0200
User-agent: 40tude_Dialog/2.0.15.1

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]