emacs-devel
[Top][All Lists]
Advanced

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

Re: How do you check if the current point is in a comment or a string? (


From: Clément Pit--Claudel
Subject: Re: How do you check if the current point is in a comment or a string? (Was Re: Problems with syntax-ppss: Was [... Apply `comment-depth' text properties when calling `back_comment'.])
Date: Wed, 9 Mar 2016 12:56:25 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 03/09/2016 12:24 PM, Kaushal Modi wrote:
> (nth 8 (syntax-ppss)) works fine for me in something like ";; some
> comment in an emacs-lisp-mode buffer"; it returns the starting point
> of the comment.

Does it really? For me it returns nil when the point is as shown below:

  <point>;; some comment in an emacs-lisp-mode buffer

In C mode, it returns nil in the following two positions:

  /<point>/ asd
  <point>// asd

As well as these two:

  <point>/* asd */
  /<point>* asd */

In all these cases, the font trick works.

Clément.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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