Hello,<br><br>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.<br>
<br>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.<br><br>--- erlang.el 2009-03-12 15:23:02.000000000 +0300<br>
+++ erlang.patched.el 2009-05-10 01:40:55.000000000 +0400<br>@@ -952,6 +952,8 @@<br> "handle_info/2," n><br> "terminate/2, code_change/3])." n n<br> <br>+ "-define(SERVER, ?MODULE)." n n<br>
+ <br> "-record(state, {})." n n<br> <br> (erlang-skel-double-separator 2)<br>@@ -1047,6 +1049,8 @@<br> "-export([init/1, handle_event/2, handle_call/2, " n><br> "handle_info/2, terminate/2, code_change/3])." n n<br>
<br>+ "-define(SERVER, ?MODULE)." n n <br>+ <br> "-record(state, {})." n n<br> <br> (erlang-skel-double-separator 2)<br>@@ -1149,6 +1153,8 @@<br> "-export([init/1, state_name/2, state_name/3, handle_event/3," n><br>
"handle_sync_event/4, handle_info/3, terminate/3, code_change/4])." n n<br> <br>+ "-define(SERVER, ?MODULE)." n n <br>+ <br> "-record(state, {})." n n<br> <br> (erlang-skel-double-separator 2)<br clear="all">
<br><br>-- <br>With Best Regards,<br>Alexander Dergachev<br>