[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fri, 19 Jul 2002 10:54:11 -0600 (MDT)
(defun inside-comment-or-string-p ()
"Return non-nil if `point' is inside a comment or string."
(let ((state (syntax-ppss (point))))
(or (nth 3 state) (nth 4 state))))
Stefan, do you see any reason this would be wrong?
(Depending on font lock would not be a general solution.)
If Stefan sees no basic flaw in this, then would one of you like to
try modifying some of the functions in lisp.el to test this criterion?
I guess backward-up-list could move backward out of the string
constant and treat that as one level of list. Same-level motion
commands could move to the beginning or end of the string and count
that as having moved over one sexp.