From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: integration with Python mode Date: Sun, 7 Jan 2007 19:08:16 +0200 Message-ID: <200701071908.16284.pogonyshev@gmx.net> References: <200701062323.37472.pogonyshev@gmx.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1168189591 30046 80.91.229.12 (7 Jan 2007 17:06:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 7 Jan 2007 17:06:31 +0000 (UTC) Cc: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 07 18:06:28 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H3bTI-0003MB-Sf for ged-emacs-devel@m.gmane.org; Sun, 07 Jan 2007 18:06:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H3bTI-0002mz-8A for ged-emacs-devel@m.gmane.org; Sun, 07 Jan 2007 12:06:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H3bPa-0001De-IM for emacs-devel@gnu.org; Sun, 07 Jan 2007 12:02:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H3bPX-0001Cc-T8 for emacs-devel@gnu.org; Sun, 07 Jan 2007 12:02:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H3bPU-0001CP-UF for emacs-devel@gnu.org; Sun, 07 Jan 2007 12:02:19 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1H3bPU-00022q-5D for emacs-devel@gnu.org; Sun, 07 Jan 2007 12:02:16 -0500 Original-Received: (qmail invoked by alias); 07 Jan 2007 17:02:15 -0000 Original-Received: from unknown (EHLO [80.94.234.14]) [80.94.234.14] by mail.gmx.net (mp045) with SMTP; 07 Jan 2007 18:02:15 +0100 X-Authenticated: #16844820 Original-To: emacs-devel@gnu.org User-Agent: KMail/1.7.2 In-Reply-To: Content-Disposition: inline X-Y-GMX-Trusted: 0 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:64924 Archived-At: 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? >=20 > How do you do it in other major modes? I don't think python-mode is spec= ial > in this respect. Well, I heavily depend on major mode. Typesetter mode converts normal characters like " and - to typographically valid punctuation characters, like =E2=80=9C=E2=80=9D, =E2=80=98=E2=80=99 or =E2=80=94 etc. Of course, s= uch 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? >=20 > How 'bout (nth 3 (syntax-ppss )) ? Thanks. Documentation says it parses Lisp syntax, however. Will it give proper results in Python buffers? Paul