From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Brady Trainor <mail@bradyt.com> Newsgroups: gmane.emacs.bugs Subject: bug#31972: 27.0.50; syntax-ppss depth incorrect after font-lock syntax-alist Date: Mon, 25 Jun 2018 16:26:34 -0700 Message-ID: <20180625232635.3778010261@mailuser.nyi.internal> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1529969410 4506 195.159.176.226 (25 Jun 2018 23:30:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 25 Jun 2018 23:30:10 +0000 (UTC) To: 31972@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 26 01:30:06 2018 Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org> Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>) id 1fXavu-00015A-3w for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Jun 2018 01:30:06 +0200 Original-Received: from localhost ([::1]:49703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>) id 1fXay1-0008HV-BH for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Jun 2018 19:32:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1fXaxq-0008HM-Jv for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2018 19:32:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1fXaxm-0001kI-Jl for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2018 19:32:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55765) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1fXaxm-0001il-Gw for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2018 19:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1fXaxm-0004UQ-10 for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2018 19:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Brady Trainor <mail@bradyt.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Jun 2018 23:32:01 +0000 Resent-Message-ID: <handler.31972.B.152996949715930@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 31972 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.152996949715930 (code B ref -1); Mon, 25 Jun 2018 23:32:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Jun 2018 23:31:37 +0000 Original-Received: from localhost ([127.0.0.1]:35429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1fXaxM-00048H-Q7 for submit@debbugs.gnu.org; Mon, 25 Jun 2018 19:31:37 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <mail@bradyt.com>) id 1fXasl-0002Rp-8u for submit@debbugs.gnu.org; Mon, 25 Jun 2018 19:26:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <mail@bradyt.com>) id 1fXase-0007nm-JY for submit@debbugs.gnu.org; Mon, 25 Jun 2018 19:26:46 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:56118) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <mail@bradyt.com>) id 1fXase-0007ng-FD for submit@debbugs.gnu.org; Mon, 25 Jun 2018 19:26:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <mail@bradyt.com>) id 1fXasc-0007qv-ML for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2018 19:26:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <mail@bradyt.com>) id 1fXasX-0007kn-LQ for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2018 19:26:42 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:39313) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <mail@bradyt.com>) id 1fXasX-0007k0-Es for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2018 19:26:37 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id B2C7621CA8; Mon, 25 Jun 2018 19:26:35 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 25 Jun 2018 19:26:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=DrDI8guJoaGt9ZuACMudpwP9Mot8a HUME/1LXW/h9aE=; b=KWIKZ/qSu9Cn71oBpTMn/HUSOigaXw0gA+DMueAx8A+kD hfxRj95YRuY3xDW69oqrOq9QoDLY7awaVzJKzRdDQ/Ug4Rs6UxSTb1Ly2fqHX6Q3 fbO91qEL/yyvgLuhQLvvOysAoAAfztB4b57JE3uqw6PrIN4MvVugWe28d6sWyw0j NjyR3UZHxDcQqwVKLXFllm1abd6l1hBrlatd3uJ05tu7Ii4+sLzp3XASVvmF82Kz iKw3drmDagbhwEOQ9p/uYfXlIyxF8jzmWAOHqzyUI9IxFMqtr+W2bdCmRsV2PNSB IRwiNcjcgeNV61cvdyihvDhuMSm88quH/CFXSXrdA== X-ME-Proxy: <xmx:K3oxW7h9mH9MDzamUyX4wJGj5ilb4-oIFIdPwnEvIJ7Fkg8QeywiVg> <xmx:K3oxWxxvy2mG4LdBd9q6eQBCGq9kvx7aestrLJyEhigfP92QHK4wHg> <xmx:K3oxW4BqEx0gAU7T1d2fninclOEHfkw86THXNn6CTtVLNvbvmOnU0A> <xmx:K3oxW5NVIxs9b48W_uolsoQVpUL5gVMtCmUma5dBu30nQWT7uNcHHA> <xmx:K3oxW-iWd_kSR5fVpxWYc84tiCBjmuiQUqo1-wSx3625a9oXSfDKAQ> <xmx:K3oxW0-y7bNzCNC2VpBiQ2oObkJkavQRqbK4QgF_T4ottXInhfqJNQ> X-ME-Sender: <xms:K3oxW__BYKkd_wv3-QX4B4edGuZpQFoT5chVZznCOKOipmZpxuXvVw> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Mon, 25 Jun 2018 19:31:36 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>, <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/archive/html/bug-gnu-emacs/> List-Post: <mailto:bug-gnu-emacs@gnu.org> List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>, <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe> Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org> Xref: news.gmane.org gmane.emacs.bugs:147823 Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/147823> After `emacs -Q`, I open a file with --8<---------------cut here---------------start------------->8--- (define-derived-mode dart-mode prog-mode "Dart" "" (setq comment-start "//") (setq comment-end "") (setq font-lock-defaults '(nil nil nil ((?/ . "_ 12") (?\n . ">")))) ;; (modify-syntax-entry ?/ "_ 12") ;; (modify-syntax-entry ?\n ">") ) (provide 'dart-mode) --8<---------------cut here---------------end--------------->8--- I open a file and `M-x dart-mode RET`, with contents say --8<---------------cut here---------------start------------->8--- // A comment (with a parenthesized // note). --8<---------------cut here---------------end--------------->8--- Then with point on beginning of second line, I try `M-: (car (syntax-ppss)) RET` and find that depth is reported as 1, rather than 0. If I comment out the `font-lock-defaults` expression and instead use `modify-syntax-entry` expressions, I get depth 0 throughout. I did not look much further for some clarification in `font-lock`, as it did not seem right to me. You may ask why do I need `syntax-ppss` to report no depth change in comments? I currently intend to use `syntax-ppss` for an `indent-line-function`. Thank you for considering this! -- Brady In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin17.4.0, NS appkit-1561.20= Version 10.13.3 (Build 17D102)) of 2018-04-11 built on iams-MacBook-Air.local Repository revision: 57442b6812e9ec565efc39f722e84079dd71d8c0 System Description: Mac OS X 10.13.3 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... [3 times] You can run the command =E2=80=98eval-buffer=E2=80=99 with M-x ev-b RET You can run the command =E2=80=98dart-mode=E2=80=99 with M-x dar RET (1 145 188 nil nil nil 0 nil nil (145) nil) Configured using: 'configure --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=3D/usr/local/share/emacs/site-lisp --infodir=3D/usr/local/Cellar/emacs/HEAD-57442b6/share/info/emacs --prefix=3D/usr/local/Cellar/emacs/HEAD-57442b6 --without-x --with-xml2 --with-dbus --with-gnutls --with-imagemagick --with-modules --with-rsvg --without-pop --with-ns --disable-ns-self-contained' Configured features: RSVG IMAGEMAGICK DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Dart Minor modes in effect: diff-auto-refine-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils dart-mode derived vc-git diff-mode easymenu easy-mmode term/screen term/xterm xterm time-date elec-pair tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 212690 10486) (symbols 48 20527 1) (miscs 40 37 176) (strings 32 30827 1661) (string-bytes 1 811691) (vectors 16 33744) (vector-slots 8 683017 8048) (floats 8 53 623) (intervals 56 318 0) (buffers 992 14))