From: Nicholas Drozd <nicholasdrozd@gmail.com>
To: 33804@debbugs.gnu.org
Subject: bug#33804: [PATCH] * src/editfns.c (insert-char): Skip unnecessary fixnum check
Date: Wed, 19 Dec 2018 10:48:24 -0600 [thread overview]
Message-ID: <CABAiW0qvXQ69MGPZcaSv4z1MfXwF3vSuToo2JNE4hCHurBBgdQ@mail.gmail.com> (raw)
COUNT gets set to 1 when it is passed in as nil, and in that case
there is no need to check its type.
---
src/editfns.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/editfns.c b/src/editfns.c
index 8df4ed107e..9bfab74a9a 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1471,7 +1471,8 @@ called interactively, INHERIT is t. */)
CHECK_CHARACTER (character);
if (NILP (count))
XSETFASTINT (count, 1);
- CHECK_FIXNUM (count);
+ else
+ CHECK_FIXNUM (count);
c = XFIXNAT (character);
if (!NILP (BVAR (current_buffer, enable_multibyte_characters)))
--
2.17.1
next reply other threads:[~2018-12-19 16:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 16:48 Nicholas Drozd [this message]
2018-12-19 16:57 ` bug#33804: [PATCH] * src/editfns.c (insert-char): Skip unnecessary fixnum check Paul Eggert
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=CABAiW0qvXQ69MGPZcaSv4z1MfXwF3vSuToo2JNE4hCHurBBgdQ@mail.gmail.com \
--to=nicholasdrozd@gmail.com \
--cc=33804@debbugs.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 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).