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 19:08:16 +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.  Typesetter mode converts normal
characters like " and - to typographically valid punctuation characters,
like “”, ‘’ or — etc.  Of course, such characters must not be inserted
in contexts that don't expect them, e.g. outside strings in programming
modes.

> > Is there a better way than checking 'face property?
> 
> How 'bout (nth 3 (syntax-ppss <pos>)) ?

Thanks.  Documentation says it parses Lisp syntax, however.  Will it
give proper results in Python buffers?

Paul




reply via email to

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