diff --git a/src/global.c b/src/global.c
index 6209d119dcb7825cdf21dac67dc924bafc1eb086..7909bdbd2efff031aab6ecc5966e2e742923df0e 100644
--- a/src/global.c
+++ b/src/global.c
@@ -318,11 +318,6 @@ void flip_newbuffer(void)
 void discard_buffer(void)
 {
 }
-#ifdef ENABLE_NANORC
-void implant(void)
-{
-}
-#endif
 
 /* Add a function to the function list. */
 void add_to_funcs(void (*func)(void), int menus, const char *desc, const char *help,
@@ -1386,19 +1381,6 @@ void set_spell_shortcuts(void)
 }
 #endif /* ENABLE_COLOR && ENABLE_SPELLER */
 
-/* Execute the function of the given shortcut. */
-void execute(const sc *shortcut)
-{
-#ifdef ENABLE_NANORC
-	if (shortcut->func == implant)
-		/* Insert the corresponding string into the keyboard buffer. */
-		for (int i = strlen(shortcut->expansion); i > 0; i--)
-			put_back(shortcut->expansion[i - 1]);
-	else
-#endif
-		shortcut->func();
-}
-
 const subnfunc *sctofunc(const sc *s)
 {
 	subnfunc *f = allfuncs;
diff --git a/src/nano.c b/src/nano.c
index fcb0c1bab3d0b955d5142c51bef21f4ada1947d5..ebff96759dbe17018bdf8ba7f84d3bedd2fc5dfb 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1728,8 +1728,8 @@ int do_input(bool allow_funcs)
 			pletion_line = NULL;
 #endif
 #ifdef ENABLE_NANORC
-		if (shortcut->func == implant) {
-			execute(shortcut);
+		if (shortcut->func == (void *)implant) {
+			implant(shortcut->expansion);
 			return 42;
 		}
 #endif
@@ -1756,7 +1756,7 @@ int do_input(bool allow_funcs)
 			}
 #endif
 			/* Execute the function of the shortcut. */
-			execute(shortcut);
+			shortcut->func();
 
 #ifndef NANO_TINY
 			/* When the marked region changes without Shift being held,
diff --git a/src/prompt.c b/src/prompt.c
index edb23fecd7c627f3434f7aaab5c5e1c20f41e4ca..e8fbbc0d591ece9776a13acc5e57ddf37161761d 100644
--- a/src/prompt.c
+++ b/src/prompt.c
@@ -153,8 +153,8 @@ int do_statusbar_input(bool *finished)
 								shortcut->func == do_backspace))
 			;
 #ifdef ENABLE_NANORC
-		else if (shortcut->func == implant)
-			execute(shortcut);
+		else if (shortcut->func == (void *)implant)
+			implant(shortcut->expansion);
 #endif
 		else if (shortcut->func == do_verbatim_input)
 			do_statusbar_verbatim_input();
@@ -172,7 +172,7 @@ int do_statusbar_input(bool *finished)
 			 * to TRUE to indicate that we're done after running or trying to
 			 * run its associated function. */
 			if (!ISSET(VIEW_MODE) || sctofunc(shortcut)->viewok)
-				execute(shortcut);
+				shortcut->func();
 			*finished = TRUE;
 		}
 	}
diff --git a/src/proto.h b/src/proto.h
index 26f7d6d837e5234798cf650ea8eb9d725bffc2bd..a19c5148b1134ad0f85eef947d80c576a88c3e5e 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -318,7 +318,6 @@ char *input_tab(char *buf, bool allow_files, size_t *place,
 
 /* Some functions in global.c. */
 size_t length_of_list(int menu);
-void implant(void);
 const sc *first_sc_for(int menu, void (*func)(void));
 int the_code_for(void (*func)(void), int defaultval);
 functionptrtype func_from_key(int *kbinput);
@@ -330,7 +329,6 @@ void shortcut_init(void);
 void set_lint_or_format_shortcuts(void);
 void set_spell_shortcuts(void);
 #endif
-void execute(const sc *shortcut);
 const subnfunc *sctofunc(const sc *s);
 const char *flagtostr(int flag);
 sc *strtosc(const char *input);
@@ -624,6 +622,9 @@ void run_macro(void);
 size_t get_key_buffer_len(void);
 void put_back(int keycode);
 void unget_kbinput(int kbinput, bool metakey);
+#ifdef ENABLE_NANORC
+void implant(const char *string);
+#endif
 int get_kbinput(WINDOW *win, bool showcursor);
 int parse_kbinput(WINDOW *win);
 int arrow_from_abcd(int kbinput);
diff --git a/src/rcfile.c b/src/rcfile.c
index d064a2671c8a18e0ec5c0f5e03eae18c5d6ea257..362f3c8e187f38b3671c9923f7f09b9e54961bcf 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -338,7 +338,7 @@ bool is_universal(void (*func)(void))
 		func == do_prev_word_void || func == do_next_word_void ||
 #endif
 #ifdef ENABLE_NANORC
-		func == implant ||
+		func == (void *)implant ||
 #endif
 		func == do_delete || func == do_backspace ||
 		func == do_cut_text_void || func == do_uncut_text ||
@@ -421,7 +421,7 @@ void parse_binding(char *ptr, bool dobind)
 		 * otherwise it is the name of a function. */
 		if (*funcptr == '"') {
 			newsc = nmalloc(sizeof(sc));
-			newsc->func = implant;
+			newsc->func = (void *)implant;
 			newsc->expansion = mallocstrcpy(NULL, funcptr + 1);
 #ifndef NANO_TINY
 			newsc->toggle = 0;
diff --git a/src/winio.c b/src/winio.c
index 9eab17563f0d851b2a3d7d453a52e728a722588f..a4803ce07e1532e026b1246261604b3021fdc9cc 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -286,6 +286,15 @@ void unget_kbinput(int kbinput, bool metakey)
 		put_back(ESC_CODE);
 }
 
+#ifdef ENABLE_NANORC
+/* Insert the given string into the keyboard buffer. */
+void implant(const char *string)
+{
+	for (int i = strlen(string); i > 0; i--)
+		put_back(string[i - 1]);
+}
+#endif
+
 /* Try to read input_len codes from the keystroke buffer.  If the
  * keystroke buffer is empty and win isn't NULL, try to read in more
  * codes from win and add them to the keystroke buffer before doing