[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21072: 24.5; inconsistent behaviour of `C-M-h (mark-defun)' in Emacs
From: |
Drew Adams |
Subject: |
bug#21072: 24.5; inconsistent behaviour of `C-M-h (mark-defun)' in Emacs Lisp |
Date: |
Tue, 7 Feb 2017 08:14:56 -0800 (PST) |
> >> ;; Trick with 'mark-defun-back due to Drew Adams
> >
> > No need for the attribution. ;-)
>
> Why not;-)? I'll change it to a link to your message, however - this
> might be actually more useful for future developers.
Yes, that's more useful; thx.
> > I didn't really test, but for this:
> >
> > (defun a ()
> > nil)
> > (defun b ()
> > nil)
> > ;;;;
> > (defun c ()
> > nil)
> >
> > With point anywhere in either of the last two defuns or
> > on the comment line between them, `M-- C-M-h' selects not
> > only the expected defun but also the last line of the
> > defun before it.
> >
> > E.g., with point at the beginning of the comment line,
> > this is selected:
> >
> > nil)
> > (defun a ()
> > nil)
>
> Yep, you're right. However, this seems to be a strange feature of
> beginning-of-defun. Place the point at the very same place at say M-:
> (beginning-of-defun 0). See?
>
> Since I guess almost nobody follows this discussion anymore, I'll ask
> about it in a separate thread on emacs-devel. The question remains,
> however: should I "fix" beginning-of-defun or just circumvent this
> behavior in my code?
Yes, please pose the question for emacs-devel. And thanks for
working on this bug.