[Top][All Lists]

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

Re: A problem with old bugs

From: Eli Zaretskii
Subject: Re: A problem with old bugs
Date: Wed, 08 Mar 2017 18:08:38 +0200

> From: Marcin Borkowski <address@hidden>
> Cc: address@hidden
> Date: Wed, 08 Mar 2017 08:01:45 +0100
> > I replied to the 2 bug reports, let's hope we will get the ball
> > rolling again on them.
> OK, I'll try to make a few final modifications and push them.


> > As for the patch posted here, I think it makes sense to make such
> > changes only if they are done in all modes.  Doing that only in one
> > major mode will only confuse people.  So if you'd like to pursue this
> > change (and I do think it would be a good change), please make the
> > change in a way that will produce similar behavior in all the other
> > modes with define their beginning-of-defun functionality.
> I am not sure whether I understand.  The problem was specifically with
> lisp version of `beginning-of-defun'.  With other modes, there is a bit of
> a mess: some modes set `beginning-of-defun-function' (e.g. js-mode and
> js2-mode), some rebind C-M-a to their beginning-of-defun (e.g. c-mode).
> Now, other modes (again, I used c-mode and js2-mode for reference) do
> various things when arg=0 for beginning-of-defun - e.g. c-mode claims to
> go back to the current defun's header, js2-mode just pretends that arg
> is 1 etc.

I tried in Lisp and in C, and they both go up one line.

> Unifying that (1) might not be the best idea and (2) would require quite
> a lot of work for all Emacs built-in modes.

But if we do that only in Lisp, we just increase the mess, don't we?
I might be okay with fixing only a few popular modes, because that
will make the mess smaller, so it will be a step in the right
direction, even if we don't go all the way.

> I could try to do that, but this would take a bit.  Also, I do not know
> many of the languages involved, and I'd prefer not to touch their
> modes.

I don't expect you to need to know these languages, as
beginning-of-defun should already be well defined for them.

reply via email to

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