[erlang-patches] minor fix for erlang.el
Alexander Dergachev
cy6erbr4in@REDACTED
Sun May 10 00:22:21 CEST 2009
Hello,
I was a little bit surprised when I tried to use skeletons in the Emacs
instead of hand writing of code. I`ve found that for some skeletons there
were missed definition of ?SERVER macro, for example, it`s missed for these
behaviours: gen_server, gen_event and gen_fsm, but it`s used in all of them
in the start_link function.
Maybe there`s some reason for it? It would be very good if somebody could
explain it for me. If there`s no reason, and it`s mistake, I would like to
propose my modest patch for this issue.
--- erlang.el 2009-03-12 15:23:02.000000000 +0300
+++ erlang.patched.el 2009-05-10 01:40:55.000000000 +0400
@@ -952,6 +952,8 @@
"handle_info/2," n>
"terminate/2, code_change/3])." n n
+ "-define(SERVER, ?MODULE)." n n
+
"-record(state, {})." n n
(erlang-skel-double-separator 2)
@@ -1047,6 +1049,8 @@
"-export([init/1, handle_event/2, handle_call/2, " n>
"handle_info/2, terminate/2, code_change/3])." n n
+ "-define(SERVER, ?MODULE)." n n
+
"-record(state, {})." n n
(erlang-skel-double-separator 2)
@@ -1149,6 +1153,8 @@
"-export([init/1, state_name/2, state_name/3, handle_event/3," n>
"handle_sync_event/4, handle_info/3, terminate/3, code_change/4])." n n
+ "-define(SERVER, ?MODULE)." n n
+
"-record(state, {})." n n
(erlang-skel-double-separator 2)
--
With Best Regards,
Alexander Dergachev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20090510/0c58b1a1/attachment.htm>
More information about the erlang-patches
mailing list