emacs-devel
[Top][All Lists]
Advanced

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

Re: sh-script beg-end of function


From: Stefan Monnier
Subject: Re: sh-script beg-end of function
Date: Fri, 23 Nov 2007 11:34:29 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

>> replacement should be at least as good.  Most importantly: jumping to
>> the end of a real function should jump to the closing "}".
> Not, if exists usually no closing "}" while writing. I prefer to
> set closings last and manually - the reports I get then
> are more valuable than possible savings before.

The case where a function is not yet completed is the rare exception and
shouldn't drive the decision as to what the main behavior should be.

> Here a small diff to enable modes to set beginning-of-defun-function without 
> disturbing each other:

They can (and should/must) already do that by using
`make-local-variable'.  Grep for   beginning-of-defun-function in
lisp/**/*.el to see how other modes do it.

>> - the docstring of `comment-beginning' says "Find the beginning of the
>> enclosing comment" so I'm wondering why you decided to use that in
>> a context where you have no idea whether or not you're inside
>> a comment.  Why don't you just use (forward-comment (- (point-max)))

> Thanks. Simply wasn't aware of that.

That's odd: seeing your posts on this list, you clearly spent a fair bit
of time dealing with `comment-beginning': the first thing you should do
in such a case is read its docstring.

Again, please send your code as a *patch*.


        Stefan




reply via email to

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