summaryrefslogtreecommitdiffstats
path: root/extras/emacs/plugin-main-skel.el
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-05-18 14:52:54 -0400
committerDave Barach <dave@barachs.net>2019-05-18 14:53:23 -0400
commit35465dc0be7d4e607f5bc3d094e2e845e61cea70 (patch)
treefc66c883ef30d787df4a58f50d1dc6d83533e35e /extras/emacs/plugin-main-skel.el
parent8fdde3c22ff981f0c41b78d3640e3249873e8495 (diff)
emacs-lisp: add missing '\' in template
Fixes the generated setup_message_id_table(...) implementation. Without a level of quoting in the emacs lisp skeleton, the underscore macro used to generate calls to vl_msg_api_add_msg_name_crc produces "fooCRC" instead of "foo_CRC". That confuses the Python language binding. Punctuation saves lives: "Let's eat Grandma" vs. "Let's eat, Grandma." Or some such. Change-Id: Ibecc20337092199d6757165ac96b70c830511bb3 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'extras/emacs/plugin-main-skel.el')
-rw-r--r--extras/emacs/plugin-main-skel.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/extras/emacs/plugin-main-skel.el b/extras/emacs/plugin-main-skel.el
index 14606c639c5..31b258eb11f 100644
--- a/extras/emacs/plugin-main-skel.el
+++ b/extras/emacs/plugin-main-skel.el
@@ -104,8 +104,8 @@ int " plugin-name "_enable_disable (" plugin-name "_main_t * " main-p ", u32 sw_
sw_if_index, enable_disable, 0, 0);
/* Send an event to enable/disable the periodic scanner process */
- vlib_process_signal_event (" main-p "->vlib_main, " plugin-name"_periodic_node.index,
- " PLUGIN-NAME"_EVENT_PERIODIC_ENABLE_DISABLE,
+ vlib_process_signal_event (" main-p "->vlib_main, " plugin-name"_periodic_node.index,
+ " PLUGIN-NAME"_EVENT_PERIODIC_ENABLE_DISABLE,
(uword)enable_disable);
return rv;
@@ -122,7 +122,7 @@ static clib_error_t *
int rv;
- while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
+ while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, \"disable\"))
enable_disable = 0;
@@ -138,7 +138,7 @@ static clib_error_t *
rv = " plugin-name "_enable_disable (" main-p ", sw_if_index, enable_disable);
- switch(rv)
+ switch(rv)
{
case 0:
break;
@@ -160,7 +160,7 @@ static clib_error_t *
}
/* *INDENT-OFF* */
-VLIB_CLI_COMMAND (" plugin-name "_enable_disable_command, static) =
+VLIB_CLI_COMMAND (" plugin-name "_enable_disable_command, static) =
{
.path = \"" plugin-name " enable-disable\",
.short_help =
@@ -210,7 +210,7 @@ static void
setup_message_id_table (" plugin-name "_main_t * " main-p ", api_main_t * am)
{
#define _(id,n,crc) \
- vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + " main-p "->msg_id_base);
+ vl_msg_api_add_msg_name_crc (am, #n \"_\" #crc, id + " main-p "->msg_id_base);
foreach_vl_msg_name_crc_" plugin-name" ;
#undef _
}
@@ -252,7 +252,7 @@ VNET_FEATURE_INIT (" plugin-name ", static) =
/* *INDENT-ON */
/* *INDENT-OFF* */
-VLIB_PLUGIN_REGISTER () =
+VLIB_PLUGIN_REGISTER () =
{
.version = VPP_BUILD_VER,
.description = \"" plugin-name " plugin description goes here\",
@@ -267,4 +267,3 @@ VLIB_PLUGIN_REGISTER () =
* End:
*/
")
-