all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lee Duhem <lee.duhem@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: [PATCH] src/eval.c (Fapply): Remove unnecessary goto
Date: Fri, 5 Dec 2014 16:17:00 +0800	[thread overview]
Message-ID: <CAOSer0D1++zFAw_44Jb6S-79HfZVteNuhgzFCVO1UoV_XOCTKQ@mail.gmail.com> (raw)
In-Reply-To: <jwvzjb39r5h.fsf-monnier+emacs@gnu.org>

Hi Stefan,

Thank you for your comments.

On Fri, Dec 5, 2014 at 3:18 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
> Oops, indeed.  Installed in emacs-24.

Why do not change the master branch?

Let me guess. Because this is a bug fix, so it should come to
current release branch, aka emacs-24, and master branch will
get this change when emacs-24 is merged to it. Am I correct?

>
>> + * eval.c (Fapply): Remove unnecessary goto.
>
> Yes, that function was poorly structured.  I had some restructuring in
> my local tree as well for a long time, so I took advantage of your patch
> to do a more thorough job (installed in master).
>
>> -      if (numargs < XSUBR (fun)->min_args
>> -  || (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < numargs))
>> - goto funcall; /* Let funcall get the error.  */
>> -      else if (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args > numargs)
>> +      if (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args > numargs)
>
> This is actually not quite right:

Now I see. I missed a possible error condition.

>
>> + * eval.c(Fbacktrace): Avoid unnecessary strlen calls.
>
> I'm ambivalent on this one: printing the backtrace really shouldn't be
> performance sensitive, and using -1 makes it easier to change the code.

Good point.

Sincerely,
lee



  reply	other threads:[~2014-12-05  8:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25  3:21 [PATCH] src/eval.c (Fapply): Remove unnecessary goto Lee Duhem
2014-12-04 19:18 ` Stefan Monnier
2014-12-05  8:17   ` Lee Duhem [this message]
2014-12-05 14:53     ` 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=CAOSer0D1++zFAw_44Jb6S-79HfZVteNuhgzFCVO1UoV_XOCTKQ@mail.gmail.com \
    --to=lee.duhem@gmail.com \
    --cc=emacs-devel@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.