all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Aaron S. Hawley" <aaron.s.hawley@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 2379@emacsbugs.donarmstrong.com, bug-gnu-emacs@gnu.org
Subject: bug#2379: [PATCH?] lisp.el: beginning-of-defun
Date: Thu, 19 Feb 2009 23:27:33 -0500	[thread overview]
Message-ID: <aea22dab0902192027v5587d98cocc7e0b6212e30b03@mail.gmail.com> (raw)
In-Reply-To: <jwvtz6qs5kx.fsf-monnier+emacsbugreports@gnu.org>

Hey Stefan.  Thanks for the reply.

>> -      (progn (goto-char (1- (match-end 0)))) t))
>> +      (progn (goto-char (1- (match-end 0))) t)))
>
> I think that was the intention.  Note that it turns out that the two
> forms are equivalent in this context (because goto-char never returns
> nil).

Yes, I had noticed sloppy programming got lucky.

> AFAICT, proper support for 0 would require a serious rethink of BOD's
> semantics: currently if you're inside defun number N, then (BOD i) moves
> to (N-(i-1)) is i is positive and to (N-i) if i is negative.  I.e. it
> moves to N if i=1 and to N+1 if i=-1, so where should 0 move to: there
> is no other defun between those two.

Fair enough.

I notice that C-0 M-x end-of-defun is the same as just regular M-x
end-of-defun.  Also, It's worth citing beginning-of-line's behavior
here, since it departs by moving in the oppisite direction --  N-1+i.

Anyway, I'm just surprised this critical code for Lisp support is this sloppy.

Cheers,
/a







  reply	other threads:[~2009-02-20  4:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-19  2:37 bug#2379: [PATCH?] lisp.el: beginning-of-defun Aaron S. Hawley
2009-02-19 17:31 ` Stefan Monnier
2009-02-20  4:27   ` Aaron S. Hawley [this message]
2009-02-20 15:25     ` Stefan Monnier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aea22dab0902192027v5587d98cocc7e0b6212e30b03@mail.gmail.com \
    --to=aaron.s.hawley@gmail.com \
    --cc=2379@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.