From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Andreas_R=c3=b6hler?= Newsgroups: gmane.emacs.devel Subject: Re: The current state of the comment-cache branch Date: Sat, 24 Dec 2016 22:48:21 +0100 Message-ID: References: <20161223215056.GA2771@acm.fritz.box> <83fuldzre1.fsf@gnu.org> <20161224083054.GA2212@acm.fritz.box> <83bmw1zoy8.fsf@gnu.org> <20161224094246.GD2212@acm.fritz.box> <20161224113620.GF2212@acm.fritz.box> <838tr5zge4.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------BBD0DC1CA98B18B653BF372A" X-Trace: blaine.gmane.org 1482615542 30093 195.159.176.226 (24 Dec 2016 21:39:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Dec 2016 21:39:02 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.5.1 Cc: Alan Mackenzie To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 24 22:38:58 2016 Return-path: Envelope-to: ged-emacs-devel@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 ) id 1cKu1k-0006a8-4H for ged-emacs-devel@m.gmane.org; Sat, 24 Dec 2016 22:38:52 +0100 Original-Received: from localhost ([::1]:44800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKu1o-0005i2-TW for ged-emacs-devel@m.gmane.org; Sat, 24 Dec 2016 16:38:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKu1i-0005hx-3o for emacs-devel@gnu.org; Sat, 24 Dec 2016 16:38:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKu1e-00029H-VZ for emacs-devel@gnu.org; Sat, 24 Dec 2016 16:38:50 -0500 Original-Received: from mout.kundenserver.de ([212.227.126.133]:49459) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cKu1e-000299-KU for emacs-devel@gnu.org; Sat, 24 Dec 2016 16:38:46 -0500 Original-Received: from [192.168.178.35] ([77.12.77.254]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MVHuk-1c3lFR1Lwc-00YlO6; Sat, 24 Dec 2016 22:38:39 +0100 In-Reply-To: <838tr5zge4.fsf@gnu.org> X-Provags-ID: V03:K0:xsxyRYh3EaTn5Kvv0QLUr1hY+CNELEm1vfofNV1uqzM1gRA1pAX 8gVV76KkCRJ5ZOAx2H0Ca6W2ts9ZqlwxwSIgBATIrp77w+r2e2Oo+9TmuaM85V7+zaw3d1Q xKiwsTJrMMHer2t3QAqGpGSzBVhy7R7eloCygh5gqGdwjWzrFTHThXctS242/F4Cu622UPL R7pnYvtbXUb4xsPL9YzFA== X-UI-Out-Filterresults: notjunk:1;V01:K0:6TQQhGx5sH8=:Zrvv/Sgf95UccpVrjTa3Na IeOZElYVba6ryStojnwGljYLd84KD0UaFsy5FwCKKHJ8SgmumHcK/lIHCx7uuMYTliBvVS+kk xSZlm7IZi+gdJwvgCHsogX92FNeYC47uldt+ZP/dz3QVIuRU/LPGSbSUTSrhxyN8kiXfsmEdF pVTwMcWa2USqtSVOj64mDuSGJa1424o0C28ZAscb0CFKMoK6CmRYT3PsJGbVTnAQ+pdJdAIf+ DB0ZwW27WPfM8qVkrItDOdtb7T+2ycoVkuGLmZk9xw8HANjRPupLxpRY92hK0BDH0+G9TfBNL /KuK84wymDqzyDOz6zvmucwsBuTSrJCxktkVv25f8XJOxjAxEKTrcD5cX7BsQxyvoEed2Ms9e wodh9gMLxHGgWEzPQ9x/DIvzeO28WQW4maU+UzWiBt0M/9WG5LdfB4nT6aRf7x81KNoF5cYUS Vaklf9V1OH/AC3wN2A+l5X+84pc8wWIEu18x2S1gaTCnHdIYA4691UWzRjC3rJYaecvqmSL2G FVq83CBKCW6SKMKC47iH0411BEY5yccuEDiCDUfK+Y0LOWYerC586Uhe5FOG39hqPP+rxv1zR U5y0Kfnp8Nf2AsHtdXHwGmZ87NH2HAlbLT6ETKNT4KOw7G73lomPG9RFmmwwiDnFNisoUesUh fGaIKnGSjkQILy1/HJhkykaTfJ3nu2CRSR19EPKlpQs3zZaEpuhYIedsljr1KViAWaJ/4zpX6 HXczJhFpsmr6D+dW X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.133 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:210793 Archived-At: This is a multi-part message in MIME format. --------------BBD0DC1CA98B18B653BF372A Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 24.12.2016 13:00, Eli Zaretskii wrote: >> > I think one missing piece of the puzzle, which is what confused Elias, > is that open-paren-in-column-0-is-defun-start is not only about '(', > it's about any character that has the "open parenthesis" syntax class > under the current syntax tables. And in C mode, that includes '{' and > '[', with the former being the important one. I think. > Hi Alan and all, there is no necessity for these `open-paren-in-column-0-is-defun-start' , as a function def starts at the beginning of the list, if its beginning is followed by the keyword "defun". `open-paren-in-column-0-is-defun-start' will never be reliable WRT nested definitions. Here is a suggestion how to solve this for Emacs Lisp: ar-backward-defun from https://github.com/andreas-roehler/thingatpt-utils-core/blob/master/ar-subr.el It should be possible to write things accordingly for other languages. --------------BBD0DC1CA98B18B653BF372A Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit



On 24.12.2016 13:00, Eli Zaretskii wrote:

I think one missing piece of the puzzle, which is what confused Elias,
is that open-paren-in-column-0-is-defun-start is not only about '(',
it's about any character that has the "open parenthesis" syntax class
under the current syntax tables.  And in C mode, that includes '{' and
'[', with the former being the important one.  I think.


Hi Alan and all,

there is no necessity for these `open-paren-in-column-0-is-defun-start' , as a function def starts at the beginning of the list, if its beginning is followed by the keyword "defun".

`open-paren-in-column-0-is-defun-start'  will never be reliable WRT nested definitions.

Here is a suggestion how to solve this for Emacs Lisp:

ar-backward-defun

from


https://github.com/andreas-roehler/thingatpt-utils-core/blob/master/ar-subr.el

It should be possible to write things accordingly for other languages.

--------------BBD0DC1CA98B18B653BF372A--