all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmx.net>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: integration with Python mode
Date: Sun, 7 Jan 2007 19:08:16 +0200	[thread overview]
Message-ID: <200701071908.16284.pogonyshev@gmx.net> (raw)
In-Reply-To: <jwvirfix2ia.fsf-monnier+emacs@gnu.org>

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	other threads:[~2007-01-07 17:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-06 21:23 integration with Python mode Paul Pogonyshev
2007-01-07 15:49 ` Stefan Monnier
2007-01-07 17:08   ` Paul Pogonyshev [this message]
2007-01-07 19:11     ` Stefan Monnier
2007-01-07 19:58       ` Paul Pogonyshev
2007-01-07 22:18         ` Stefan Monnier
2007-01-07 22:35           ` Lennart Borgman (gmail)
2007-01-07 17:22   ` Paul Pogonyshev
2007-01-07 19:13     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200701071908.16284.pogonyshev@gmx.net \
    --to=pogonyshev@gmx.net \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.