From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] comment-cache 223d16f 2/3: Apply `comment-depth' text properties when calling `back_comment'. Date: Tue, 08 Mar 2016 13:42:28 -0500 Message-ID: References: <20160308132530.861.91488@vcs.savannah.gnu.org> <20160308183010.GB6269@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1457462578 25450 80.91.229.3 (8 Mar 2016 18:42:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Mar 2016 18:42:58 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 08 19:42:49 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 1adMam-0002bf-Tr for ged-emacs-devel@m.gmane.org; Tue, 08 Mar 2016 19:42:49 +0100 Original-Received: from localhost ([::1]:36609 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adMam-0003ZA-AK for ged-emacs-devel@m.gmane.org; Tue, 08 Mar 2016 13:42:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adMaW-0003Wv-Pf for emacs-devel@gnu.org; Tue, 08 Mar 2016 13:42:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adMaU-0007An-3m for emacs-devel@gnu.org; Tue, 08 Mar 2016 13:42:32 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:19206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adMaT-0007Ae-Vl for emacs-devel@gnu.org; Tue, 08 Mar 2016 13:42:30 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CYDQA731xV/30PNJ1cgxCEAshgBAICgTw8EQEBAQEBAQGBCkEFg10BAQMBViMFCwsOJgcLFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0FjDCeS4oJI4IKHBWBWyCCeAEBAQ X-IPAS-Result: A0CYDQA731xV/30PNJ1cgxCEAshgBAICgTw8EQEBAQEBAQGBCkEFg10BAQMBViMFCwsOJgcLFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0FjDCeS4oJI4IKHBWBWyCCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="195576941" Original-Received: from 157-52-15-125.cpe.teksavvy.com (HELO pastel.home) ([157.52.15.125]) by ironport2-out.teksavvy.com with ESMTP; 08 Mar 2016 13:42:28 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 44DB46410C; Tue, 8 Mar 2016 13:42:28 -0500 (EST) In-Reply-To: <20160308183010.GB6269@acm.fritz.box> (Alan Mackenzie's message of "Tue, 8 Mar 2016 18:30:11 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:201190 Archived-At: >> > Apply `comment-depth' text properties when calling `back_comment'. >> FWIW, I think if you want to speed up back_comment, a simpler approach >> is to make it use syntax-ppss, which already implements a cache, and >> will usually already have the cache filled for you. > My changes might speed up back_comment, but that's not the prime reason > for them. Rather, I want utterly to expunge all the nonsense about > parens in column 0. Not sure how the two differ. The main/only real use for this "paren in column 0" hack is for back_comment. IOW my comment also applies to "if you want to get rid of all the nonsense about parens in column 0". > That a high class editor such as Emacs should have > problems with such parens is ludicrous and unacceptable. FWIW, I (setq open-paren-in-column-0-is-defun-start nil) in my ~/.emacs. > With my change, open_paren_in_column_0_is_defun_start simply vanishes > from syntax.c[*], as does `find_defun_start'. Using syntax-ppss would give you the same benefit. My point is that instead of creating a new kind of "syntax cache" for this specific purpose, we'd be better off using the cache we already have. Stefan