<!--
 %CopyrightBegin%

 SPDX-License-Identifier: Apache-2.0

 Copyright Ericsson AB 1999-2025. All Rights Reserved.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.

 %CopyrightEnd%
-->

User configuration notes
========================

Below is a quick guide to necessary configurations for getting
started with the Erlang mode for Emacs. Please refer to the
Users guide and reference manual in the documentation for the
Erlang/OTP application tools for more information.


For UNIX users
--------------

To set up the Erlang Emacs mode on UNIX systems, edit/create the file
.emacs in the your home directory.
    
Below is a complete example of what should be added to a user's .emacs
provided that OTP is installed in the directory /usr/local/otp:
        
      (setq load-path (cons "/usr/local/otp/lib/tools-<ToolsVer>/emacs"
      load-path))
      (setq erlang-root-dir "/usr/local/otp")
      (setq exec-path (cons "/usr/local/otp/bin" exec-path))
      (require 'erlang-start)


For Windows users
-----------------
   
To set up the Erlang Emacs mode on Windows systems, edit/create the
file .emacs, the location of the file depends on the configuration of
the system. If the HOME environment variable is set, Emacs will look
for the .emacs file in the directory indicated by the HOME
variable. If HOME is not set, Emacs will look for the .emacs file in
C:\.
    
Below is a complete example of what should be added to a user's .emacs
provided that OTP is installed in the directory "C:\Program
Files\Erlang OTP":
      
      (setq load-path (cons  "C:/Program Files/erl<Ver>/lib/tools-<ToolsVer>/emacs"
      load-path))
      (setq erlang-root-dir "C:/Program Files/Erlang OTP")
      (setq exec-path (cons "C:/Program Files/Erlang OTP/bin" exec-path))
      (require 'erlang-start)


Miscellaneous addons
--------------------

In order to check erlang source code on the fly, add the following
line to your .emacs file (after erlang-start, see above).  See
erlang-flymake.el for more information on how to customize the syntax
check.

      (require 'erlang-flymake)
