emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The current state of the comment-cache branch


From: Andreas Röhler
Subject: Re: The current state of the comment-cache branch
Date: Sat, 24 Dec 2016 22:48:21 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.5.1



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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]