From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.devel Subject: Re: How do you check if the current point is in a comment or a string? (Was Re: Problems with syntax-ppss: Was [... Apply `comment-depth' text properties when calling `back_comment'.]) Date: Wed, 9 Mar 2016 14:19:29 -0500 Message-ID: References: <20160308132530.861.91488@vcs.savannah.gnu.org> <20160308183010.GB6269@acm.fritz.box> <20160308200753.GC6269@acm.fritz.box> <20160309104900.GA3948@acm.fritz.box> <56E05831.9070900@gmail.com> <56E063C9.4080203@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0115fa5c148249052da29672 X-Trace: ger.gmane.org 1457551229 3139 80.91.229.3 (9 Mar 2016 19:20:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Mar 2016 19:20:29 +0000 (UTC) Cc: Emacs developers To: =?UTF-8?B?Q2zDqW1lbnQgUGl0LS1DbGF1ZGVs?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 09 20:20:23 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1adjec-0006tk-Ea for ged-emacs-devel@m.gmane.org; Wed, 09 Mar 2016 20:20:18 +0100 Original-Received: from localhost ([::1]:43639 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adjeb-0001Tj-TI for ged-emacs-devel@m.gmane.org; Wed, 09 Mar 2016 14:20:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adjeX-0001Ri-Vb for emacs-devel@gnu.org; Wed, 09 Mar 2016 14:20:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adjeU-0005kD-4u for emacs-devel@gnu.org; Wed, 09 Mar 2016 14:20:13 -0500 Original-Received: from mail-ob0-x235.google.com ([2607:f8b0:4003:c01::235]:34536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adjeT-0005k3-W9 for emacs-devel@gnu.org; Wed, 09 Mar 2016 14:20:10 -0500 Original-Received: by mail-ob0-x235.google.com with SMTP id ts10so57373593obc.1 for ; Wed, 09 Mar 2016 11:20:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=p2jyOOC49ke+wnH3+n1vK/cfWM6pAiRWEXWP2bc2LWE=; b=WMHHHjXamUrhxXaG1iXizBzCSUIpnyLhs81tMzPQXF60WFt4PPGlSAY/q3B0Wk5+Tq jk7pXvA7+8bKLH739Ps3XGGvg1KRzAKYouWPh14yFYvGMpRjbnTqRlTD1U8i6Tkjwsgw k4b7ltFeDWZXRoK1gxtN+M9IGtTl8A3G83+tizrP4Klo7Xfl6mLoN/4r9+dWRfFbpl7T dcXIHMky3/BekNDpSagtM+bbwqAyoTek9EHNAzaorgALasTCfwaUZmUmzAc2jUnK9knY 8x3Y9qWh2pTErB3LdY2baIyb4f3YzId/6QQmv/tLGr/GG12PJ68A8UcTLJO7lrgaDl9X g17Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=p2jyOOC49ke+wnH3+n1vK/cfWM6pAiRWEXWP2bc2LWE=; b=iqIKHnvxiRs8TwHbTu2P2kNdV0nj5TSOfzALr9Xh6ybMCwJhvdHV8jjSjhdbEvqNKn u8bGl4lAbFqiv+UlW+q6hBjk9DTjgIaVQU5ovp2hN1vTKDwWc+7gwqZyo6HePLeSdTDD ykwYy7ILwVoFAhj4sbpJMosFTh+aWt4nFQ0wqtTE8TkEOplgitc8s3Se0U/O7Cq+XwOO K2iMZQSNnepMVEUx0jYTr2nuvyI6JzBFRSn/am37uGbrhUToaL1QRKVGUVJDMpn2TNG3 +1JDvsVpH2+VkE7ahD/qZ9zQ4rD6sH/WiQHECE88GcqxKcsSyb6Hzge2NKlRnyjtsfj9 qSxQ== X-Gm-Message-State: AD7BkJKHtJkugVy2eIqsd9I2ABZcK77uPASrcy2uGcHCrWTNOSrTMorCemVwAz9diLv4QG9qpGZ3A6TE+3tj5A== X-Received: by 10.60.161.144 with SMTP id xs16mr21747783oeb.15.1457551209429; Wed, 09 Mar 2016 11:20:09 -0800 (PST) Original-Received: by 10.202.172.198 with HTTP; Wed, 9 Mar 2016 11:19:29 -0800 (PST) In-Reply-To: <56E063C9.4080203@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c01::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:201293 Archived-At: --089e0115fa5c148249052da29672 Content-Type: text/plain; charset=UTF-8 You are correct; it does not work if the point is before the first comment character. That makes sense if you visualize syntax-ppss to look at the chars ONLY up to the point. I never faced this case in my application. May be have a combination of looking-at comment-start or double quote (") and syntax-ppss? --089e0115fa5c148249052da29672 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
You are correct; it does not wo= rk if the point is before the first comment character.=C2=A0 That makes sen= se if you visualize syntax-ppss to look at the chars ONLY up to the point. = I never faced this case in my application.
=
May be have a combination of looking-a= t comment-start or double quote (") and syntax-ppss?

--089e0115fa5c148249052da29672--