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

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

Re: Is there any elisp functions to tell whether the cursor is in a comm


From: Johan Bockgård
Subject: Re: Is there any elisp functions to tell whether the cursor is in a comment block?
Date: Sun, 13 Jul 2008 11:53:28 +0200
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux)

sunway <sunwayforever@gmail.com> writes:

> for example, if the cursor is in a normal c code block, I want 'if '
> to be expanded to 'if () {}', if it is in the comment block, I prefer
> 'if ' not be expanded.

;; Non-nil when inside comment or string
(nth 8 (syntax-ppss (point)))

-- 
Johan Bockgård


reply via email to

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