From: Marcin Borkowski <mbork@mbork.pl>
To: Drew Adams <drew.adams@oracle.com>
Cc: rfflrccrd@gmail.com, 21072@debbugs.gnu.org
Subject: bug#21072: 24.5; inconsistent behaviour of `C-M-h (mark-defun)' in Emacs Lisp
Date: Tue, 07 Feb 2017 07:22:51 +0100 [thread overview]
Message-ID: <8737fqtt8k.fsf@mbork.pl> (raw)
In-Reply-To: <42ff21f5-3df8-4935-b30d-b13b6bcd5f85@default>
Hi Drew, hi all,
sorry for the delay - as I mentioned last time, I was going to have
a very busy semester, which now came to an end - and hence I'm back.
On 2016-11-27, at 19:51, Drew Adams <drew.adams@oracle.com> wrote:
> Again, thanks for working on this.
>
>> (defun in-comment-line-p ()
>> "Return non-nil if the point is in a comment line.
>> See http://lists.gnu.org/archive/html/help-gnu-emacs/2016-
>> 08/msg00141.html"
>
> The second doc-string sentence should just be a comment in the
> code, if it is needed at all.
Done, thanks.
>
>> If the mark is active, it marks the next defun after the one(s)
>> already marked. With positive ARG, mark that many more defuns.
>
> more -> next
Done, thanks.
>
>> ;; 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.
> 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?
Best,
--
Marcin Borkowski
next prev parent reply other threads:[~2017-02-07 6:22 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 6:12 bug#21072: 24.5; inconsistent behaviour of `C-M-h (mark-defun)' in Emacs Lisp Raffaele Ricciardi
2016-04-25 11:11 ` Marcin Borkowski
2016-05-01 17:17 ` Eli Zaretskii
2016-05-01 17:49 ` Marcin Borkowski
2016-05-01 18:09 ` Eli Zaretskii
2016-05-01 19:45 ` Marcin Borkowski
2016-05-01 19:56 ` Eli Zaretskii
2016-05-03 18:58 ` Marcin Borkowski
2016-05-04 14:45 ` Eli Zaretskii
2016-05-06 12:27 ` Marcin Borkowski
2016-05-06 12:59 ` Eli Zaretskii
2016-05-07 3:47 ` Marcin Borkowski
2016-05-07 5:07 ` Drew Adams
2016-10-11 12:31 ` Marcin Borkowski
2016-10-11 15:30 ` Drew Adams
2016-10-11 17:07 ` Marcin Borkowski
2016-10-11 17:52 ` Clément Pit--Claudel
2016-10-11 20:26 ` Drew Adams
2016-10-11 21:15 ` Drew Adams
2016-10-28 5:35 ` Marcin Borkowski
2016-10-28 14:32 ` Drew Adams
2016-11-02 7:28 ` Marcin Borkowski
2016-11-02 18:25 ` Drew Adams
2016-11-04 7:48 ` Marcin Borkowski
2016-11-27 7:40 ` Marcin Borkowski
2016-11-27 18:51 ` Drew Adams
2017-02-07 6:22 ` Marcin Borkowski [this message]
2017-02-07 16:14 ` Drew Adams
2016-05-07 6:47 ` Eli Zaretskii
2016-06-05 6:30 ` Marcin Borkowski
2016-06-05 7:01 ` bug#21072: Forgotten attachment (was: bug#21072: 24.5; inconsistent behaviour of `C-M-h (mark-defun)' in Emacs Lisp) Marcin Borkowski
2016-06-09 11:56 ` bug#21072: 24.5; inconsistent behaviour of `C-M-h (mark-defun)' in Emacs Lisp Marcin Borkowski
2016-06-21 7:58 ` Marcin Borkowski
2016-06-21 9:05 ` Andreas Röhler
2016-06-21 10:07 ` Marcin Borkowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8737fqtt8k.fsf@mbork.pl \
--to=mbork@mbork.pl \
--cc=21072@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
--cc=rfflrccrd@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).