emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] feature/aptel/dynamic-modules-rc3 a95e032 17/35: update mo


From: Noah Friedman
Subject: [Emacs-diffs] feature/aptel/dynamic-modules-rc3 a95e032 17/35: update modules examples with `provide' call.
Date: Mon, 8 May 2017 19:46:28 -0400 (EDT)

branch: feature/aptel/dynamic-modules-rc3
commit a95e032333775a133efb4b69d4f9e9bf4b4a1bab
Author: Aurélien Aptel <address@hidden>
Commit: Aurélien Aptel <address@hidden>

    update modules examples with `provide' call.
---
 modules/curl/curl.c     | 5 +++++
 modules/elisp/elisp.c   | 5 ++++-
 modules/fmod/fmod.c     | 7 +++++++
 modules/opaque/opaque.c | 5 +++++
 4 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/modules/curl/curl.c b/modules/curl/curl.c
index d1e11be..b8b2bb6 100644
--- a/modules/curl/curl.c
+++ b/modules/curl/curl.c
@@ -7,6 +7,7 @@
 #include <lisp.h>
 
 int plugin_is_GPL_compatible;
+static Lisp_Object Qcurl;
 
 struct buffer
 {
@@ -106,8 +107,12 @@ void init ()
   curl_global_init (CURL_GLOBAL_ALL);
   /* when unloading: curl_global_cleanup(); */
 
+  DEFSYM (Qcurl, "curl");
+
   defsubr (&Scurl_make);
   defsubr (&Scurl_fetch_url);
   defsubr (&Scurl_content);
   defsubr (&Scurl_free);
+
+  Fprovide (Qcurl, Qnil);
 }
diff --git a/modules/elisp/elisp.c b/modules/elisp/elisp.c
index cf61a74..aabb24e 100644
--- a/modules/elisp/elisp.c
+++ b/modules/elisp/elisp.c
@@ -4,7 +4,7 @@
 
 int plugin_is_GPL_compatible;
 
-static Lisp_Object Qreplace_regexp_in_string;
+static Lisp_Object Qelisp, Qreplace_regexp_in_string;
 
 #define MAKE_STRING(s) (make_string (s, sizeof(s)-1))
 
@@ -29,7 +29,10 @@ DEFUN ("elisp-test", Felisp_test, Selisp_test, 0, 0, 0,
 
 void init ()
 {
+  DEFSYM (Qelisp, "elisp");
   DEFSYM (Qreplace_regexp_in_string, "replace-regexp-in-string");
 
   defsubr (&Selisp_test);
+
+  Fprovide (Qelisp, Qnil);
 }
diff --git a/modules/fmod/fmod.c b/modules/fmod/fmod.c
index 4f591b8..57da616 100644
--- a/modules/fmod/fmod.c
+++ b/modules/fmod/fmod.c
@@ -7,6 +7,9 @@
 
 int plugin_is_GPL_compatible;
 
+/* module feature name */
+static Lisp_Object Qfmod;
+
 /* define a new lisp function */
 
 EXFUN (Ffmod, 2);
@@ -46,8 +49,12 @@ DEFUN ("fmod-test3", Ffmod_test3, Sfmod_test3, 0, 0, 0,
 
 void init ()
 {
+  DEFSYM (Qfmod, "fmod");
+
   defsubr (&Sfmod);
   defsubr (&Sfmod_test1);
   defsubr (&Sfmod_test2);
   defsubr (&Sfmod_test3);
+
+  Fprovide (Qfmod, Qnil);
 }
diff --git a/modules/opaque/opaque.c b/modules/opaque/opaque.c
index d20ebeb..2366b2e 100644
--- a/modules/opaque/opaque.c
+++ b/modules/opaque/opaque.c
@@ -2,6 +2,7 @@
 #include <lisp.h>
 
 int plugin_is_GPL_compatible;
+static Lisp_Object Qopaque;
 
 struct opaque
 {
@@ -49,6 +50,8 @@ DEFUN ("opaque-get", Fopaque_get, Sopaque_get, 2, 2, 0,
 
 void init ()
 {
+  DEFSYM (Qopaque, "opaque");
+
   DEFSYM (Qa, "a");
   DEFSYM (Qb, "b");
   DEFSYM (Qc, "c");
@@ -56,4 +59,6 @@ void init ()
   defsubr (&Sopaque_make);
   defsubr (&Sopaque_free);
   defsubr (&Sopaque_get);
+
+  Fprovide (Qopaque, Qnil);
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]