Sophie

Sophie

distrib > Fedora > 17 > i386 > by-pkgid > 675c8c8167236dfcf8d66da674f931e8 > files > 1510

erlang-doc-R15B-03.3.fc17.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- Erlang mode for Emacs</title>
</head>
<body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript">
            <!--
              function getWinHeight() {
                var myHeight = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                  //Non-IE
                  myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth ||
                                                         document.documentElement.clientHeight ) ) {
                  //IE 6+ in 'standards compliant mode'
                  myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                  //IE 4 compatible
                  myHeight = document.body.clientHeight;
                }
                return myHeight;
              }

              function setscrollpos() {
                var objf=document.getElementById('loadscrollpos');
                 document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
              }

              function addEvent(obj, evType, fn){
                if (obj.addEventListener){
                obj.addEventListener(evType, fn, true);
                return true;
              } else if (obj.attachEvent){
                var r = obj.attachEvent("on"+evType, fn);
                return r;
              } else {
                return false;
              }
             }

             addEvent(window, 'load', setscrollpos);

             //--></script><div id="leftnav"><div class="innertube">
<img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/tools-2.6.8.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>Tools</strong><br><strong>Reference Manual</strong><br><small>Version 2.6.8</small></p>
<br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Table of Contents</strong></small></p>
<ul class="flipMenu">
<li id="no" title="cover " expanded="false">cover<ul>
<li><a href="cover.html">
                  Top of manual page
                </a></li>
<li title="start-0"><a href="cover.html#start-0">start/0</a></li>
<li title="start-1"><a href="cover.html#start-1">start/1</a></li>
<li title="compile-1"><a href="cover.html#compile-1">compile/1</a></li>
<li title="compile-2"><a href="cover.html#compile-2">compile/2</a></li>
<li title="compile_module-1"><a href="cover.html#compile_module-1">compile_module/1</a></li>
<li title="compile_module-2"><a href="cover.html#compile_module-2">compile_module/2</a></li>
<li title="compile_directory-0"><a href="cover.html#compile_directory-0">compile_directory/0</a></li>
<li title="compile_directory-1"><a href="cover.html#compile_directory-1">compile_directory/1</a></li>
<li title="compile_directory-2"><a href="cover.html#compile_directory-2">compile_directory/2</a></li>
<li title="compile_beam-1"><a href="cover.html#compile_beam-1">compile_beam/1</a></li>
<li title="compile_beam_directory-0"><a href="cover.html#compile_beam_directory-0">compile_beam_directory/0</a></li>
<li title="compile_beam_directory-1"><a href="cover.html#compile_beam_directory-1">compile_beam_directory/1</a></li>
<li title="analyse-1"><a href="cover.html#analyse-1">analyse/1</a></li>
<li title="analyse-2"><a href="cover.html#analyse-2">analyse/2</a></li>
<li title="analyse-2"><a href="cover.html#analyse-2">analyse/2</a></li>
<li title="analyse-3"><a href="cover.html#analyse-3">analyse/3</a></li>
<li title="analyse_to_file-1"><a href="cover.html#analyse_to_file-1">analyse_to_file/1</a></li>
<li title="analyse_to_file-2"><a href="cover.html#analyse_to_file-2">analyse_to_file/2</a></li>
<li title="analyse_to_file-2"><a href="cover.html#analyse_to_file-2">analyse_to_file/2</a></li>
<li title="analyse_to_file-3"><a href="cover.html#analyse_to_file-3">analyse_to_file/3</a></li>
<li title="async_analyse_to_file-1"><a href="cover.html#async_analyse_to_file-1">async_analyse_to_file/1</a></li>
<li title="async_analyse_to_file-2"><a href="cover.html#async_analyse_to_file-2">async_analyse_to_file/2</a></li>
<li title="async_analyse_to_file-2"><a href="cover.html#async_analyse_to_file-2">async_analyse_to_file/2</a></li>
<li title="async_analyse_to_file-3"><a href="cover.html#async_analyse_to_file-3">async_analyse_to_file/3</a></li>
<li title="modules-0"><a href="cover.html#modules-0">modules/0</a></li>
<li title="imported_modules-0"><a href="cover.html#imported_modules-0">imported_modules/0</a></li>
<li title="imported-0"><a href="cover.html#imported-0">imported/0</a></li>
<li title="which_nodes-0"><a href="cover.html#which_nodes-0">which_nodes/0</a></li>
<li title="is_compiled-1"><a href="cover.html#is_compiled-1">is_compiled/1</a></li>
<li title="reset-1"><a href="cover.html#reset-1">reset/1</a></li>
<li title="reset-0"><a href="cover.html#reset-0">reset/0</a></li>
<li title="export-1"><a href="cover.html#export-1">export/1</a></li>
<li title="export-2"><a href="cover.html#export-2">export/2</a></li>
<li title="import-1"><a href="cover.html#import-1">import/1</a></li>
<li title="stop-0"><a href="cover.html#stop-0">stop/0</a></li>
<li title="stop-1"><a href="cover.html#stop-1">stop/1</a></li>
</ul>
</li>
<li id="no" title="cprof " expanded="false">cprof<ul>
<li><a href="cprof.html">
                  Top of manual page
                </a></li>
<li title="analyse-0"><a href="cprof.html#analyse-0">analyse/0</a></li>
<li title="analyse-1"><a href="cprof.html#analyse-1">analyse/1</a></li>
<li title="analyse-1"><a href="cprof.html#analyse-1">analyse/1</a></li>
<li title="analyse-2"><a href="cprof.html#analyse-2">analyse/2</a></li>
<li title="pause-0"><a href="cprof.html#pause-0">pause/0</a></li>
<li title="pause-1"><a href="cprof.html#pause-1">pause/1</a></li>
<li title="pause-2"><a href="cprof.html#pause-2">pause/2</a></li>
<li title="pause-3"><a href="cprof.html#pause-3">pause/3</a></li>
<li title="restart-0"><a href="cprof.html#restart-0">restart/0</a></li>
<li title="restart-1"><a href="cprof.html#restart-1">restart/1</a></li>
<li title="restart-2"><a href="cprof.html#restart-2">restart/2</a></li>
<li title="restart-3"><a href="cprof.html#restart-3">restart/3</a></li>
<li title="start-0"><a href="cprof.html#start-0">start/0</a></li>
<li title="start-1"><a href="cprof.html#start-1">start/1</a></li>
<li title="start-2"><a href="cprof.html#start-2">start/2</a></li>
<li title="start-3"><a href="cprof.html#start-3">start/3</a></li>
<li title="stop-0"><a href="cprof.html#stop-0">stop/0</a></li>
<li title="stop-1"><a href="cprof.html#stop-1">stop/1</a></li>
<li title="stop-2"><a href="cprof.html#stop-2">stop/2</a></li>
<li title="stop-3"><a href="cprof.html#stop-3">stop/3</a></li>
</ul>
</li>
<li id="no" title="eprof " expanded="false">eprof<ul>
<li><a href="eprof.html">
                  Top of manual page
                </a></li>
<li title="start-0"><a href="eprof.html#start-0">start/0</a></li>
<li title="start_profiling-1"><a href="eprof.html#start_profiling-1">start_profiling/1</a></li>
<li title="start_profiling-2"><a href="eprof.html#start_profiling-2">start_profiling/2</a></li>
<li title="stop_profiling-0"><a href="eprof.html#stop_profiling-0">stop_profiling/0</a></li>
<li title="profile-1"><a href="eprof.html#profile-1">profile/1</a></li>
<li title="profile-1"><a href="eprof.html#profile-1">profile/1</a></li>
<li title="profile-2"><a href="eprof.html#profile-2">profile/2</a></li>
<li title="profile-3"><a href="eprof.html#profile-3">profile/3</a></li>
<li title="profile-4"><a href="eprof.html#profile-4">profile/4</a></li>
<li title="profile-5"><a href="eprof.html#profile-5">profile/5</a></li>
<li title="analyze-0"><a href="eprof.html#analyze-0">analyze/0</a></li>
<li title="analyze-1"><a href="eprof.html#analyze-1">analyze/1</a></li>
<li title="analyze-2"><a href="eprof.html#analyze-2">analyze/2</a></li>
<li title="log-1"><a href="eprof.html#log-1">log/1</a></li>
<li title="stop-0"><a href="eprof.html#stop-0">stop/0</a></li>
</ul>
</li>
<li title="erlang.el"><a href="erlang.el.html">erlang.el</a></li>
<li id="no" title="fprof " expanded="false">fprof<ul>
<li><a href="fprof.html">
                  Top of manual page
                </a></li>
<li title="start-0"><a href="fprof.html#start-0">start/0</a></li>
<li title="stop-0"><a href="fprof.html#stop-0">stop/0</a></li>
<li title="stop-1"><a href="fprof.html#stop-1">stop/1</a></li>
<li title="apply-2"><a href="fprof.html#apply-2">apply/2</a></li>
<li title="apply-3"><a href="fprof.html#apply-3">apply/3</a></li>
<li title="apply-3"><a href="fprof.html#apply-3">apply/3</a></li>
<li title="apply-4"><a href="fprof.html#apply-4">apply/4</a></li>
<li title="trace-2"><a href="fprof.html#trace-2">trace/2</a></li>
<li title="trace-2"><a href="fprof.html#trace-2">trace/2</a></li>
<li title="trace-2"><a href="fprof.html#trace-2">trace/2</a></li>
<li title="trace-1"><a href="fprof.html#trace-1">trace/1</a></li>
<li title="trace-1"><a href="fprof.html#trace-1">trace/1</a></li>
<li title="trace-1"><a href="fprof.html#trace-1">trace/1</a></li>
<li title="trace-1"><a href="fprof.html#trace-1">trace/1</a></li>
<li title="profile-0"><a href="fprof.html#profile-0">profile/0</a></li>
<li title="profile-2"><a href="fprof.html#profile-2">profile/2</a></li>
<li title="profile-1"><a href="fprof.html#profile-1">profile/1</a></li>
<li title="profile-1"><a href="fprof.html#profile-1">profile/1</a></li>
<li title="profile-1"><a href="fprof.html#profile-1">profile/1</a></li>
<li title="analyse-0"><a href="fprof.html#analyse-0">analyse/0</a></li>
<li title="analyse-2"><a href="fprof.html#analyse-2">analyse/2</a></li>
<li title="analyse-1"><a href="fprof.html#analyse-1">analyse/1</a></li>
<li title="analyse-1"><a href="fprof.html#analyse-1">analyse/1</a></li>
<li title="analyse-1"><a href="fprof.html#analyse-1">analyse/1</a></li>
</ul>
</li>
<li id="no" title="instrument " expanded="false">instrument<ul>
<li><a href="instrument.html">
                  Top of manual page
                </a></li>
<li title="allocator_descr-2"><a href="instrument.html#allocator_descr-2">allocator_descr/2</a></li>
<li title="block_header_size-1"><a href="instrument.html#block_header_size-1">block_header_size/1</a></li>
<li title="class_descr-2"><a href="instrument.html#class_descr-2">class_descr/2</a></li>
<li title="descr-1"><a href="instrument.html#descr-1">descr/1</a></li>
<li title="holes-1"><a href="instrument.html#holes-1">holes/1</a></li>
<li title="mem_limits-1"><a href="instrument.html#mem_limits-1">mem_limits/1</a></li>
<li title="memory_data-0"><a href="instrument.html#memory_data-0">memory_data/0</a></li>
<li title="memory_status-1"><a href="instrument.html#memory_status-1">memory_status/1</a></li>
<li title="read_memory_data-1"><a href="instrument.html#read_memory_data-1">read_memory_data/1</a></li>
<li title="read_memory_status-1"><a href="instrument.html#read_memory_status-1">read_memory_status/1</a></li>
<li title="sort-1"><a href="instrument.html#sort-1">sort/1</a></li>
<li title="store_memory_data-1"><a href="instrument.html#store_memory_data-1">store_memory_data/1</a></li>
<li title="store_memory_status-1"><a href="instrument.html#store_memory_status-1">store_memory_status/1</a></li>
<li title="sum_blocks-1"><a href="instrument.html#sum_blocks-1">sum_blocks/1</a></li>
<li title="type_descr-2"><a href="instrument.html#type_descr-2">type_descr/2</a></li>
<li title="type_no_range-1"><a href="instrument.html#type_no_range-1">type_no_range/1</a></li>
</ul>
</li>
<li id="no" title="lcnt " expanded="false">lcnt<ul>
<li><a href="lcnt.html">
                  Top of manual page
                </a></li>
<li title="start-0"><a href="lcnt.html#start-0">start/0</a></li>
<li title="stop-0"><a href="lcnt.html#stop-0">stop/0</a></li>
<li title="collect-0"><a href="lcnt.html#collect-0">collect/0</a></li>
<li title="collect-1"><a href="lcnt.html#collect-1">collect/1</a></li>
<li title="clear-0"><a href="lcnt.html#clear-0">clear/0</a></li>
<li title="clear-1"><a href="lcnt.html#clear-1">clear/1</a></li>
<li title="conflicts-0"><a href="lcnt.html#conflicts-0">conflicts/0</a></li>
<li title="conflicts-1"><a href="lcnt.html#conflicts-1">conflicts/1</a></li>
<li title="locations-0"><a href="lcnt.html#locations-0">locations/0</a></li>
<li title="locations-1"><a href="lcnt.html#locations-1">locations/1</a></li>
<li title="inspect-1"><a href="lcnt.html#inspect-1">inspect/1</a></li>
<li title="inspect-2"><a href="lcnt.html#inspect-2">inspect/2</a></li>
<li title="information-0"><a href="lcnt.html#information-0">information/0</a></li>
<li title="swap_pid_keys-0"><a href="lcnt.html#swap_pid_keys-0">swap_pid_keys/0</a></li>
<li title="load-1"><a href="lcnt.html#load-1">load/1</a></li>
<li title="save-1"><a href="lcnt.html#save-1">save/1</a></li>
<li title="apply-1"><a href="lcnt.html#apply-1">apply/1</a></li>
<li title="apply-2"><a href="lcnt.html#apply-2">apply/2</a></li>
<li title="apply-3"><a href="lcnt.html#apply-3">apply/3</a></li>
<li title="pid-2"><a href="lcnt.html#pid-2">pid/2</a></li>
<li title="pid-3"><a href="lcnt.html#pid-3">pid/3</a></li>
<li title="port-1"><a href="lcnt.html#port-1">port/1</a></li>
<li title="port-2"><a href="lcnt.html#port-2">port/2</a></li>
<li title="rt_collect-0"><a href="lcnt.html#rt_collect-0">rt_collect/0</a></li>
<li title="rt_collect-1"><a href="lcnt.html#rt_collect-1">rt_collect/1</a></li>
<li title="rt_clear-0"><a href="lcnt.html#rt_clear-0">rt_clear/0</a></li>
<li title="rt_clear-1"><a href="lcnt.html#rt_clear-1">rt_clear/1</a></li>
<li title="rt_opt-1"><a href="lcnt.html#rt_opt-1">rt_opt/1</a></li>
<li title="rt_opt-2"><a href="lcnt.html#rt_opt-2">rt_opt/2</a></li>
</ul>
</li>
<li id="no" title="make " expanded="false">make<ul>
<li><a href="make.html">
                  Top of manual page
                </a></li>
<li title="all-0"><a href="make.html#all-0">all/0</a></li>
<li title="all-1"><a href="make.html#all-1">all/1</a></li>
<li title="files-1"><a href="make.html#files-1">files/1</a></li>
<li title="files-2"><a href="make.html#files-2">files/2</a></li>
</ul>
</li>
<li id="no" title="tags " expanded="false">tags<ul>
<li><a href="tags.html">
                  Top of manual page
                </a></li>
<li title="file-1"><a href="tags.html#file-1">file/1</a></li>
<li title="files-1"><a href="tags.html#files-1">files/1</a></li>
<li title="dir-1"><a href="tags.html#dir-1">dir/1</a></li>
<li title="dirs-1"><a href="tags.html#dirs-1">dirs/1</a></li>
<li title="subdir-1"><a href="tags.html#subdir-1">subdir/1</a></li>
<li title="subdirs-1"><a href="tags.html#subdirs-1">subdirs/1</a></li>
<li title="root-1"><a href="tags.html#root-1">root/1</a></li>
</ul>
</li>
<li id="no" title="xref " expanded="false">xref<ul>
<li><a href="xref.html">
                  Top of manual page
                </a></li>
<li title="add_application-2"><a href="xref.html#add_application-2">add_application/2</a></li>
<li title="add_directory-2"><a href="xref.html#add_directory-2">add_directory/2</a></li>
<li title="add_module-2"><a href="xref.html#add_module-2">add_module/2</a></li>
<li title="add_release-2"><a href="xref.html#add_release-2">add_release/2</a></li>
<li title="analyze-2"><a href="xref.html#analyze-2">analyze/2</a></li>
<li title="d-1"><a href="xref.html#d-1">d/1</a></li>
<li title="forget-1"><a href="xref.html#forget-1">forget/1</a></li>
<li title="forget-2"><a href="xref.html#forget-2">forget/2</a></li>
<li title="format_error-1"><a href="xref.html#format_error-1">format_error/1</a></li>
<li title="get_default-1"><a href="xref.html#get_default-1">get_default/1</a></li>
<li title="get_default-2"><a href="xref.html#get_default-2">get_default/2</a></li>
<li title="get_library_path-1"><a href="xref.html#get_library_path-1">get_library_path/1</a></li>
<li title="info-1"><a href="xref.html#info-1">info/1</a></li>
<li title="info-2"><a href="xref.html#info-2">info/2</a></li>
<li title="info-3"><a href="xref.html#info-3">info/3</a></li>
<li title="m-1"><a href="xref.html#m-1">m/1</a></li>
<li title="m-1"><a href="xref.html#m-1">m/1</a></li>
<li title="q-2"><a href="xref.html#q-2">q/2</a></li>
<li title="remove_application-2"><a href="xref.html#remove_application-2">remove_application/2</a></li>
<li title="remove_module-2"><a href="xref.html#remove_module-2">remove_module/2</a></li>
<li title="remove_release-2"><a href="xref.html#remove_release-2">remove_release/2</a></li>
<li title="replace_application-3"><a href="xref.html#replace_application-3">replace_application/3</a></li>
<li title="replace_module-3"><a href="xref.html#replace_module-3">replace_module/3</a></li>
<li title="set_default-3"><a href="xref.html#set_default-3">set_default/3</a></li>
<li title="set_default-2"><a href="xref.html#set_default-2">set_default/2</a></li>
<li title="set_library_path-2"><a href="xref.html#set_library_path-2">set_library_path/2</a></li>
<li title="start-1"><a href="xref.html#start-1">start/1</a></li>
<li title="start-2"><a href="xref.html#start-2">start/2</a></li>
<li title="stop-1"><a href="xref.html#stop-1">stop/1</a></li>
<li title="update-1"><a href="xref.html#update-1">update/1</a></li>
<li title="variables-1"><a href="xref.html#variables-1">variables/1</a></li>
</ul>
</li>
</ul>
</div></div>
<div id="content">
<div class="innertube">
<!-- refpage --><center><h1>erlang.el</h1></center>
  
  <h3>MODULE</h3>
<div class="REFBODY">erlang.el</div>
  <h3>MODULE SUMMARY</h3>
<div class="REFBODY">Erlang mode for Emacs </div>
  <h3>DESCRIPTION</h3>
<div class="REFBODY"><p>
    <p>Possibly the most important feature of an editor designed for
      programmers is the ability to indent a line of code in accordance
      with the structure of the programming language. The Erlang mode
      does, of course, provide this feature.  The layout used is based
      on the common use of the language. The mode also provides things as
      syntax highlighting, electric commands, module name verification,
      comment support including paragraph filling, skeletons, tags
      support etc.</p>
    <p>In the following descriptions the use of the word <strong>Point</strong> means: "Point can be seen as the position of the
      cursor. More precisely, the point is the position between two
      characters while the cursor is drawn over the character
      following the point".</p>
  </p></div>

  <h3><a name="id75762">Indent</a></h3>
<div class="REFBODY">
    
    <p>The following command are directly available for indentation.</p>
    <ul>
      <li>
<strong><span class="code">TAB</span></strong> (<span class="code">erlang-indent-command</span>) -
       Indents the current line of code. </li>
      <li>
<strong><span class="code">M-C-\</span></strong> (<span class="code">indent-region</span>) - Indents all
       lines in the region. </li>
      <li>
<strong><span class="code">M-l</span></strong> (<span class="code">indent-for-comment</span>) - Insert a
       comment character to the right of the code on the line (if
       any).</li>
    </ul>
    <p>Lines containing comment are indented differently depending on
      the number of %-characters used: </p>
    <ul>
      <li>Lines with one %-character is indented to the right of
       the code. The column is specified by the variable
      <span class="code">comment-column</span>, by default column 48 is used.</li>
      <li>Lines with two %-characters will be indented to the same
       depth as code would have been in the same situation. </li>
      <li>Lines with three of more %-characters are indented to the
       left margin.</li>
      <li>
<strong><span class="code">C-c C-q</span></strong> (<span class="code">erlang-indent-function</span>) -
       Indents the current Erlang function. </li>
      <li>
<strong><span class="code">M-x erlang-indent-clause RET</span></strong>      <br>
 -Indent the
       current Erlang clause.</li>
      <li>
<strong><span class="code">M-x erlang-indent-current-buffer RET</span></strong> -
       Indent the entire buffer. </li>
    </ul>
  </div>

  <h3><a name="id75870">Edit - Fill Comment </a></h3>
<div class="REFBODY">
    
    <p>When editing normal text in text mode you can let Emacs reformat the
      text by the <span class="code">fill-paragraph</span> command.  This command will not work
      for comments since it will treat the comment characters as words.</p>
    <p>The Erlang editing mode provides a command that knows about the
      Erlang comment structure and can be used to fill text paragraphs
      in comments. Ex:</p>
    <div class="example"><pre>
      %% This is   just a very simple test to show
      %% how the Erlang fill
      %% paragraph   command works.</pre></div>
    <p>Clearly, the text is badly formatted.  Instead of formatting this
      paragraph line by line, let's try <span class="code">erlang-fill-paragraph</span> by
      pressing <strong><span class="code">M-q</span></strong>. The result is:</p>
    <div class="example"><pre>
      %% This is just a very simple test to show how the Erlang fill
      %% paragraph command works.</pre></div>
  </div>

  <h3><a name="id77645">Edit - Comment/Uncomment Region </a></h3>
<div class="REFBODY">
    
    <p><strong><span class="code">C-c C-c</span></strong> will put comment characters at the
      beginning of all lines in a marked region. If you want to have
      two comment characters instead of one you can do <strong><span class="code">C-u 2 C-c C-c</span></strong></p>
    <p><strong><span class="code">C-c C-u</span></strong> will undo a comment-region command. </p>
  </div>

  <h3><a name="id77672">Edit - Moving the marker </a></h3>
<div class="REFBODY">
    
    <ul>
      <li>
<strong><span class="code">C-a M-a </span></strong>
       (<span class="code">erlang-beginning-of-function</span>) - Move the point to the
       beginning of the current or preceding Erlang function.  With an
       numeric argument (ex <strong><span class="code">C-u 2 C-a M-a</span></strong>) the function
       skips backwards over this many Erlang functions. Should the
       argument be negative the point is moved to the beginning of a
       function below the current function. </li>
      <li>
<strong><span class="code">M-C-a </span></strong> (<span class="code">erlang-beginning-of-clause</span>) - As
       above but move point to the beginning of the current or
       preceding Erlang clause.</li>
      <li>
<strong><span class="code">C-a M-e </span></strong> (<span class="code">erlang-end-of-function</span>)
       - Move to the end of the current or following Erlang function.  With
       an numeric argument (ex <strong><span class="code">C-u 2 C-a M-e</span></strong>) the function
       skips backwards over this many Erlang functions. Should the argument
       be negative the point is moved to the end of a function below
       the current function.</li>
      <li>
<strong><span class="code">M-C-e </span></strong> (<span class="code">erlang-end-of-clause</span>) - As above
       but move point to the end of the current or following Erlang
       clause.</li>
    </ul>
  </div>

  <h3><a name="id77745">Edit - Marking </a></h3>
<div class="REFBODY">
    
    <ul>
      <li>
<strong><span class="code">C-c M-h</span></strong> (<span class="code">erlang-mark-function</span>) - Put the
       region around the current Erlang function.  The point is
       placed in the beginning and the mark at the end of the
       function.</li>
      <li>
<strong><span class="code">M-C-h </span></strong> (<span class="code">erlang-mark-clause</span>) Put the region
       around the current Erlang clause.  The point is placed in the
       beginning and the mark at the end of the function. </li>
    </ul>
  </div>

  <h3><a name="id77783">Edit - Function Header Commands </a></h3>
<div class="REFBODY">
    
    <ul>
      <li>
<strong><span class="code">C-c C-j</span></strong> (<span class="code">erlang-generate-new-clause</span>) -
       Create a new clause in the current Erlang function. The point is
       placed between the parentheses of the argument list.</li>
      <li>
<strong><span class="code">C-c C-y</span></strong> (<span class="code">erlang-clone-arguments</span>) -
       Copy the function arguments of the preceding Erlang clause. This
       command is useful when defining a new clause with almost the same
       argument as the preceding.</li>
    </ul>
  </div>

  <h3><a name="id77821">Edit - Arrows</a></h3>
<div class="REFBODY">
    
    <ul>
      <li>
        <p><strong><span class="code">C-c C-a</span></strong> (<span class="code">erlang-align-arrows</span>) -
          aligns arrows after clauses inside a region.</p>
        <div class="example"><pre>
        Example:
        
        sum(L) -&gt; sum(L, 0).
        sum([H|T], Sum) -&gt; sum(T, Sum + H);
        sum([], Sum) -&gt; Sum.
        
        becomes:
        
        sum(L)          -&gt; sum(L, 0).
        sum([H|T], Sum) -&gt; sum(T, Sum + H);
        sum([], Sum)    -&gt; Sum.</pre></div>
      </li>
    </ul>
  </div>

  <h3><a name="id77857">Syntax highlighting</a></h3>
<div class="REFBODY">
    
    <p>The syntax highlighting can be activated from the Erlang menu. There
      are four different alternatives:</p>
    <ul>
      <li>Off: Normal black and white display.
      </li>
      <li>Level 1: Function headers, reserved words, comments,
       strings, quoted atoms, and character constants will be
       colored. </li>
      <li>Level 2: The above, attributes, Erlang bif:s, guards, and
       words in comments enclosed in single quotes will be colored.</li>
      <li>Level 3: The above, variables, records, and macros will
       be colored. (This level is also known as the Christmas tree
       level.) </li>
    </ul>
  </div>

  <h3><a name="id77894">Tags</a></h3>
<div class="REFBODY">
    
    <p>For the tag commands to work it requires that you have
      generated a tag file. See <span class="bold_code"><a href="erlang_mode_chapter.html#tags">Erlang mode users guide</a></span></p>
    <p></p>
    <ul>
      <li>
<strong><span class="code">M-. </span></strong> (<span class="code">find-tag</span>) -
       Find a function definition. The default value is the function name
       under the point.  </li>
      <li>Find Tag (<span class="code">erlang-find-tag</span>) - Like the Elisp-function
       `find-tag'. Capable of retrieving Erlang modules. Tags can be
       given on the forms `tag', `module:', `module:tag'.</li>
      <li>
<strong><span class="code">M-+</span></strong> (<span class="code">erlang-find-next-tag</span>) - Find the
       next occurrence of tag.</li>
      <li>
<strong><span class="code">M-TAB</span></strong> (<span class="code">erlang-complete-tag</span>) -
       Perform completion on the tag entered in a tag search.
       Completes to the set of names listed in the current tags table.</li>
      <li>Tags aprops (<span class="code">tags-apropos</span>) - Display list of all tags in
       tags table REGEXP matches. </li>
      <li>
<strong><span class="code">C-x t s</span></strong> (<span class="code">tags-search</span>) - Search
       through all files listed in tags table for match for REGEXP.
       Stops when a match is found.</li>
    </ul>
  </div>

  <h3><a name="id77982">Skeletons</a></h3>
<div class="REFBODY">
    
    <p>A skeleton is a piece of pre-written code that can be inserted into
      the buffer. Erlang mode comes with a set of predefined skeletons.
      The skeletons can be accessed either from the Erlang menu of
      from commands named <span class="code">tempo-template-erlang-*</span>, as the
      skeletons is defined using the standard Emacs package "tempo".
      Here follows a brief description of the available skeletons:</p>
    <ul>
      <li>Simple skeletons: If, Case, Receive, Receive After,
       Receive Loop - Basic code constructs.
      </li>
      <li>Header elements: Module, Author - These commands insert
       lines on the form <span class="code">-module(</span>xxx<span class="code">).  </span> and
      <span class="code">-author('my@home').</span>. They can be used directly, but are
       also used as part of the full headers described below.</li>
      <li>Full Headers: Small (minimum requirement), Medium (with
       fields for basic information about the module), and Large
       Header (medium header with some extra layout structure).</li>
      <li>Small Server - skeleton for a simple server not using
       OTP.</li>
      <li>Application - skeletons for the OTP application
       behavior</li>
      <li>Supervisor - skeleton for the OTP supervisor behavior</li>
      <li>Supervisor Bridge - skeleton for the OTP supervisor bridge
       behavior </li>
      <li>gen_server - skeleton for the OTP gen_server
       behavior</li>
      <li>gen_event - skeleton for the OTP gen_event behavior</li>
      <li>gen_fsm - skeleton for the OTP gen_fsm behavior</li>
      <li>Library module - skeleton for a module that does not
       implement a process.</li>
      <li>Corba callback - skeleton for a Corba callback module.</li>
      <li>Erlang test suite - skeleton for a callback module
       for the erlang test server.</li>
    </ul>
  </div>

  <h3><a name="id78072">Shell</a></h3>
<div class="REFBODY">
    
    <ul>
      <li>New shell (<span class="code">erlang-shell</span>) - Starts a new Erlang shell.</li>
      <li>
<strong><span class="code">C-c C-z,</span></strong> (<span class="code">erlang-shell-display </span>) -
       Displays an Erlang shell, or starts a new one if there is no shell
       started.</li>
    </ul>
  </div>

  <h3><a name="id78105">Compile</a></h3>
<div class="REFBODY">
    
    <ul>
      <li>
<strong><span class="code">C-c C-k,</span></strong> (<span class="code">erlang-compile</span>) -
       Compiles the Erlang module in the current buffer.
       You can also use <strong><span class="code">C-u C-c C-k</span></strong>
       to debug compile the module with the debug options
      <span class="code">debug_info</span> and <span class="code">export_all</span>.</li>
      <li>
<strong><span class="code">C-c C-l,</span></strong> (<span class="code">erlang-compile-display</span>) -
       Display compilation output.</li>
      <li>
<strong><span class="code">C-u C-x`</span></strong> Start parsing the compiler output from the
       beginning. This command will place the point on the line where
       the first error was found.</li>
      <li>
<strong><span class="code">C-x`</span></strong> (<span class="code">erlang-next-error</span>) - Move the
       point on to the next error. The buffer displaying the
       compilation errors will be updated so that the current error
       will be visible.</li>
    </ul>
  </div>

  <h3><a name="id78174">Man</a></h3>
<div class="REFBODY">
    
    <p>On unix you can view the manual pages in emacs.
      In order to find the manual pages, the variable `erlang-root-dir'
      should be bound to the name of the directory containing the Erlang
      installation.  The name should not include the final slash.
      Practically, you should add a line on the following form to
      your ~/.emacs,</p>
    <div class="example"><pre>
      (setq erlang-root-dir "/the/erlang/root/dir/goes/here")</pre></div>
  </div>

  <h3><a name="id78194">Starting IMenu</a></h3>
<div class="REFBODY">
    
    <ul>
      <li>
<strong><span class="code">M-x imenu-add-to-menubar RET</span></strong> - This
       command will create the IMenu menu containing all the functions
       in the current buffer.The command will ask you for a suitable
       name for the menu. Not supported by Xemacs.</li>
    </ul>
  </div>

  <h3><a name="id78217">Version</a></h3>
<div class="REFBODY">
    
    <ul>
      <li>
<strong><span class="code">M-x erlang-version RET</span></strong> -
       This command displays the version number of the Erlang editing mode.
       Remember to always supply the version number when asking questions
       about the Erlang mode.</li>
    </ul>
  </div>
</div>
<div class="footer">
<hr>
<p>Copyright © 1997-2012 Ericsson AB. All Rights Reserved.</p>
</div>
</div>
</div></body>
</html>