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 21:58:23 +0200 Message-ID: <200701072158.24115.pogonyshev@gmx.net> References: <200701062323.37472.pogonyshev@gmx.net> <200701071908.16284.pogonyshev@gmx.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1168199625 22448 80.91.229.12 (7 Jan 2007 19:53:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 7 Jan 2007 19:53:45 +0000 (UTC) Cc: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 07 20:53:42 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 1H3e5C-00036w-33 for ged-emacs-devel@m.gmane.org; Sun, 07 Jan 2007 20:53:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H3e59-0002lB-Mt for ged-emacs-devel@m.gmane.org; Sun, 07 Jan 2007 14:53:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H3e50-0002ir-Lc for emacs-devel@gnu.org; Sun, 07 Jan 2007 14:53:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H3e4t-0002gs-Ki for emacs-devel@gnu.org; Sun, 07 Jan 2007 14:53:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H3e4t-0002go-Hf for emacs-devel@gnu.org; Sun, 07 Jan 2007 14:53:11 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1H3e4K-0004hR-9s for emacs-devel@gnu.org; Sun, 07 Jan 2007 14:53:10 -0500 Original-Received: (qmail invoked by alias); 07 Jan 2007 19:52:22 -0000 Original-Received: from unknown (EHLO [80.94.234.14]) [80.94.234.14] by mail.gmx.net (mp053) with SMTP; 07 Jan 2007 20:52:22 +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:64929 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? > >> > >> 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 )) ? > > 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