From: Lee Duhem <lee.duhem@gmail.com>
To: Emacs Devel <emacs-devel@gnu.org>
Subject: [PATCH] src/eval.c (Fapply): Remove unnecessary goto
Date: Tue, 25 Nov 2014 11:21:00 +0800 [thread overview]
Message-ID: <CAOSer0D9djqivTf_1mYQk=gnGOu+OU5vM8iSRv_TJDxskgTAXw@mail.gmail.com> (raw)
---
src/ChangeLog | 4 ++++
src/eval.c | 12 ++++--------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 448de36..663ca9e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2014-11-25 Lee Duhem <lee.duhem@gmail.com>
+
+ * eval.c (Fapply): Remove unnecessary goto.
+
2014-11-24 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnutls.c: Fix compilation warnings given fix --enable-gcc-warnings.
diff --git a/src/eval.c b/src/eval.c
index 77b1db9..45e5389 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2298,19 +2298,15 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
if (SYMBOLP (fun) && !NILP (fun)
&& (fun = XSYMBOL (fun)->function, SYMBOLP (fun)))
fun = indirect_function (fun);
+
if (NILP (fun))
{
/* Let funcall get the error. */
fun = args[0];
- goto funcall;
}
-
- if (SUBRP (fun))
+ else if (SUBRP (fun))
{
- 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)
{
/* Avoid making funcall cons up a yet another new vector of arguments
by explicitly supplying nil's for optional values. */
@@ -2320,7 +2316,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
funcall_nargs = 1 + XSUBR (fun)->max_args;
}
}
- funcall:
+
/* We add 1 to numargs because funcall_args includes the
function itself as well as its arguments. */
if (!funcall_args)
--
1.9.3
next reply other threads:[~2014-11-25 3:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 3:21 Lee Duhem [this message]
2014-12-04 19:18 ` [PATCH] src/eval.c (Fapply): Remove unnecessary goto Stefan Monnier
2014-12-05 8:17 ` Lee Duhem
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='CAOSer0D9djqivTf_1mYQk=gnGOu+OU5vM8iSRv_TJDxskgTAXw@mail.gmail.com' \
--to=lee.duhem@gmail.com \
--cc=emacs-devel@gnu.org \
/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.