GNU bug report logs -
#64574
[PATCH] Support not jumping to bol in beginning-of-defun
Previous Next
Full log
Message #36 received at 64574 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Sun, 23 Feb 2025 14:15:55 +0000
> Cc: sbaugh <at> janestreet.com, 64574 <at> debbugs.gnu.org
>
> > The default behavior is unchanged. As for when users change the
> > default, the only difference is that beginning-of-defun will end not
> > necessarily at column zero, but at some other column in the same line,
> > where the function's declaration begins. I don't see how this could
> > break things, but maybe I'm missing something? Can you point to
> > places where we assume pointy is at column zero after calling
> > beginning-of-defun?
>
> I can't point to any specific such places no, but grepping for
> `beginning-of-defun` yields a concerning number of hits, especially in
> progmodes. Note that the assumption that it always goes to column zero
> has been documented since forever. Who knows how this is used in the wild.
>
> IOW, yes, the behavior is optional, but my concern is that when users
> set it, modes will start breaking.
I hope the users who Spencer say like it tested that in at least some
situations?
> I still think it could be useful, but perhaps it should be a defvar
> and under the control of major modes? OTOH, then we have minor
> modes, but maybe it's used less frequently there?
Is this major-mode specific?
> If someone could look into this more and run some experiments, perhaps
> we can convince ourselves that this is fine after all, but to me this
> currently feels a bit risky.
I suggested to make it a user option because Spencer indicated users
liked that behavior. User preferences should be expressed in user
options, not in just variables.
But if you feel uneasy, I won't object to making it a simple variable.
This bug report was last modified 116 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.