emacs-devel
[Top][All Lists]
Advanced

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

Re: integration with Python mode


From: Paul Pogonyshev
Subject: Re: integration with Python mode
Date: Sun, 7 Jan 2007 21:58:23 +0200
User-agent: KMail/1.7.2

Stefan Monnier wrote:
> >> > I'd like to build support of Python mode into my Typesetter minor
> >> > mode [1].  In particular, I don't want it to insert special characters
> >> > outside of Python strings (and maybe comments.)  How do I determine if
> >> > the point is inside a string in Python mode?
> >> 
> >> How do you do it in other major modes?  I don't think python-mode is 
> >> special
> >> in this respect.
> 
> > Well, I heavily depend on major mode.
> 
> That doesn't tell me "how you do it" in other major modes.
> E.g. how do you do it in C mode?

I use `c-in-literal' and `c-literal-limits'.  If `syntax-ppss'
works with all modes (i.e. more generic), I should use that one
instead, of course.

> >> > Is there a better way than checking 'face property?
> >> How 'bout (nth 3 (syntax-ppss <pos>)) ?
> > Thanks.  Documentation says it parses Lisp syntax, however.
> 
> Report it as a documentation bug.

Uh, can it be just fixed, without additional bureacracy?  AFAIK
there isn't even a bug tracker for Emacs, though I may be wrong
here.

> > Will it give proper results in Python buffers?
> 
> It's used by font-lock.  Try it,

OK, I already did.

Paul




reply via email to

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