qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs plugins/Makefile plugins/my_plugin.c plu...


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs plugins/Makefile plugins/my_plugin.c plu...
Date: Thu, 05 Jun 2008 07:12:52 +0000

CVSROOT:        /cvsroot/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        08/06/05 07:12:52

Added files:
        plugins        : Makefile my_plugin.c 
Removed files:
        plugin-example : Makefile my_plugin.c 

Log message:
        renamed plugins directory

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/plugin-example/Makefile?cvsroot=qemacs&r1=1.1.1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/qemacs/plugin-example/my_plugin.c?cvsroot=qemacs&r1=1.5&r2=0
http://cvs.savannah.gnu.org/viewcvs/qemacs/plugins/Makefile?cvsroot=qemacs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/qemacs/plugins/my_plugin.c?cvsroot=qemacs&rev=1.1

Patches:
Index: plugins/Makefile
===================================================================
RCS file: plugins/Makefile
diff -N plugins/Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ plugins/Makefile    5 Jun 2008 07:12:51 -0000       1.1
@@ -0,0 +1,37 @@
+#
+# QEmacs sample Makefile to develop plugins
+#
+# QEmacs plugins can contain modes, bindings, or any other qemacs
+# dynamically registerable resource.
+#
+
+# modify to get the path of the qemacs sources
+QEMACS_PATH=../
+# define the name of your plugin
+LIB=my_plugin.so
+# define the object files it contains
+OBJS=my_plugin.o
+
+INCLUDES=-I$(QEMACS_PATH)
+DEFINES=-DQE_MODULE
+DIST_LIB:=$(HOME)/.qe/$(LIB)
+CC=gcc
+CFLAGS=-O2 -Wall -g -fPIC $(INCLUDES) $(DEFINES)
+
+# by default, the plugin is copied in ~/.qe/ some that qemacs can load
+# it automatically.
+all: $(DIST_LIB)
+
+$(DIST_LIB): $(LIB)
+       install -s -m 644 $< $@
+
+install: $(DIST_LIB)
+
+$(LIB): $(OBJS) Makefile
+       $(CC) -shared -o $@ $(OBJS)
+
+%.o: %.c
+       $(CC) $(CFLAGS) -c -o $@ $<
+
+clean:
+       rm -f *.o *.so *~

Index: plugins/my_plugin.c
===================================================================
RCS file: plugins/my_plugin.c
diff -N plugins/my_plugin.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ plugins/my_plugin.c 5 Jun 2008 07:12:51 -0000       1.1
@@ -0,0 +1,32 @@
+/*
+ * Simple plugin example
+ */
+#include "qe.h"
+
+/* insert 'hello' at the current cursor position */
+static void insert_hello(EditState *s)
+{
+    static char hello[] = "Hello";
+    int len;
+    len = strlen(hello);
+
+    eb_insert(s->b, s->offset, hello, len);
+    s->offset += len;
+}
+
+static CmdDef my_commands[] = {
+    CMD2( KEY_CTRLX('h'), KEY_NONE,
+          "insert-hello", insert_hello, ES, "*")
+    CMD_DEF_END,
+};
+
+static int my_plugin_init(void)
+{
+    /* commands and default keys */
+    qe_register_cmd_table(my_commands, NULL);
+
+    return 0;
+}
+
+
+qe_module_init(my_plugin_init);

Index: plugin-example/Makefile
===================================================================
RCS file: plugin-example/Makefile
diff -N plugin-example/Makefile
--- plugin-example/Makefile     29 May 2004 10:19:30 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
-#
-# QEmacs sample Makefile to develop plugins
-#
-# QEmacs plugins can contain modes, bindings, or any other qemacs
-# dynamically registerable resource.
-#
-
-# modify to get the path of the qemacs sources
-QEMACS_PATH=../
-# define the name of your plugin
-LIB=my_plugin.so
-# define the object files it contains
-OBJS=my_plugin.o
-
-INCLUDES=-I$(QEMACS_PATH)
-DEFINES=-DQE_MODULE
-DIST_LIB:=$(HOME)/.qe/$(LIB)
-CC=gcc
-CFLAGS=-O2 -Wall -g -fPIC $(INCLUDES) $(DEFINES)
-
-# by default, the plugin is copied in ~/.qe/ some that qemacs can load
-# it automatically.
-all: $(DIST_LIB)
-
-$(DIST_LIB): $(LIB)
-       install -s -m 644 $< $@
-
-install: $(DIST_LIB)
-
-$(LIB): $(OBJS) Makefile
-       $(CC) -shared -o $@ $(OBJS)
-
-%.o: %.c
-       $(CC) $(CFLAGS) -c -o $@ $<
-
-clean:
-       rm -f *.o *.so *~

Index: plugin-example/my_plugin.c
===================================================================
RCS file: plugin-example/my_plugin.c
diff -N plugin-example/my_plugin.c
--- plugin-example/my_plugin.c  25 Apr 2008 10:46:59 -0000      1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-/*
- * Simple plugin example
- */
-#include "qe.h"
-
-/* insert 'hello' at the current cursor position */
-static void insert_hello(EditState *s)
-{
-    static char hello[] = "Hello";
-    int len;
-    len = strlen(hello);
-
-    eb_insert(s->b, s->offset, hello, len);
-    s->offset += len;
-}
-
-static CmdDef my_commands[] = {
-    CMD2( KEY_CTRLX('h'), KEY_NONE,
-          "insert-hello", insert_hello, ES, "*")
-    CMD_DEF_END,
-};
-
-static int my_plugin_init(void)
-{
-    /* commands and default keys */
-    qe_register_cmd_table(my_commands, NULL);
-
-    return 0;
-}
-
-
-qe_module_init(my_plugin_init);




reply via email to

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