GNU bug report logs - #21072
24.5; inconsistent behaviour of `C-M-h (mark-defun)' in Emacs Lisp

Previous Next

Package: emacs;

Reported by: Raffaele Ricciardi <rfflrccrd <at> gmail.com>

Date: Thu, 16 Jul 2015 06:13:01 UTC

Severity: minor

Found in version 24.5

Done: Marcin Borkowski <mbork <at> mbork.pl>

Bug is archived. No further changes may be made.

Full log


Message #107 received at 21072 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Marcin Borkowski <mbork <at> mbork.pl>
Cc: rfflrccrd <at> gmail.com, 21072 <at> debbugs.gnu.org
Subject: RE: 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.




This bug report was last modified 8 years and 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.