[Top][All Lists]

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

Re: simplifying beginning-of-defun

From: Stefan Monnier
Subject: Re: simplifying beginning-of-defun
Date: Sat, 26 Sep 2009 17:44:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

> simplifying forms as below should ease maintenance and speed up execution.

To what extent does it preserve compatibility?

Apparently it makes beginning-of-defun-raw ignore
beginning-of-defun-function, and it calls end-of-defun-function with one
argument contrary to the current situation where it's called without
any argument.  So your code wouldn't be acceptable as is since it would
likely break several packages.

Which performance problem is it trying to solve?

The main difference I see between your beginning-of-defun and Emacs's
one is that yours doesn't try to handle the case where
beginning-of-defun-function, defun-prompt-regexp, and
open-paren-in-column-0-is-defun-start and all nil.  This case was added
fairly recently (Emacs-22, IIRC) after a long discussion.  I do not like
this extra case at all, actually, but if you're trying to get rid of it,
please make it a separate thread.

In other words, if you send new code just to simplify the existing one,
than make sure the incompatibilities are clearly understood and
"minor".  Otherwise, better focus on the proposal for the change in
behavior, and then accompany that with a patch showing how you suggest
to implement this change.


reply via email to

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