| Christopher Piro | 094823a | 2007-07-18 00:26:12 +0000 | [diff] [blame] | 1 | ;; erlang-start.el --- Load this file to initialize the Erlang package. | 
|  | 2 |  | 
|  | 3 | ;; Copyright (C) 1998  Ericsson Telecom AB | 
|  | 4 |  | 
|  | 5 | ;; Author:   Anders Lindgren | 
|  | 6 | ;; Version:  2.3 | 
|  | 7 | ;; Keywords: erlang, languages, processes | 
|  | 8 | ;; Created:  1996-09-18 | 
|  | 9 | ;; Date:     1998-03-16 | 
|  | 10 |  | 
|  | 11 | ;;; Commentary: | 
|  | 12 |  | 
|  | 13 | ;; Introduction: | 
|  | 14 | ;; ------------ | 
|  | 15 | ;; | 
|  | 16 | ;; This package provides support for the programming language Erlang. | 
|  | 17 | ;; The package provides an editing mode with lots of bells and | 
|  | 18 | ;; whistles, compilation support, and it makes it possible for the | 
|  | 19 | ;; user to start Erlang shells that run inside Emacs. | 
|  | 20 | ;; | 
|  | 21 | ;; See the Erlang distribution for full documentation of this package. | 
|  | 22 |  | 
|  | 23 | ;; Installation: | 
|  | 24 | ;; ------------ | 
|  | 25 | ;; | 
|  | 26 | ;; Place this file in Emacs load path, byte-compile it, and add the | 
|  | 27 | ;; following line to the appropriate init file: | 
|  | 28 | ;; | 
|  | 29 | ;;    (require 'erlang-start) | 
|  | 30 | ;; | 
|  | 31 | ;; The full documentation contains much more extensive description of | 
|  | 32 | ;; the installation procedure. | 
|  | 33 |  | 
|  | 34 | ;; Reporting Bugs: | 
|  | 35 | ;; -------------- | 
|  | 36 | ;; | 
|  | 37 | ;; Please send bug reports to the following email address: | 
|  | 38 | ;;     support@erlang.ericsson.se | 
|  | 39 | ;; | 
|  | 40 | ;; Please state as exactly as possible: | 
|  | 41 | ;;    - Version number of Erlang Mode (see the menu), Emacs, Erlang, | 
|  | 42 | ;;	and of any other relevant software. | 
|  | 43 | ;;    - What the expected result was. | 
|  | 44 | ;;    - What you did, preferably in a repeatable step-by-step form. | 
|  | 45 | ;;    - A description of the unexpected result. | 
|  | 46 | ;;    - Relevant pieces of Erlang code causing the problem. | 
|  | 47 | ;;    - Personal Emacs customisations, if any. | 
|  | 48 | ;; | 
|  | 49 | ;; Should the Emacs generate an error, please set the emacs variable | 
|  | 50 | ;; `debug-on-error' to `t'.  Repeat the error and enclose the debug | 
|  | 51 | ;; information in your bug-report. | 
|  | 52 | ;; | 
|  | 53 | ;; To set the variable you can use the following command: | 
|  | 54 | ;;     M-x set-variable RET debug-on-error RET t RET | 
|  | 55 | ;;; Code: | 
|  | 56 |  | 
|  | 57 | ;; | 
|  | 58 | ;; Declare functions in "erlang.el". | 
|  | 59 | ;; | 
|  | 60 |  | 
|  | 61 | (autoload 'erlang-mode "erlang" "Major mode for editing Erlang code." t) | 
|  | 62 | (autoload 'erlang-version "erlang" | 
|  | 63 | "Return the current version of Erlang mode." t) | 
|  | 64 | (autoload 'erlang-shell "erlang" "Start a new Erlang shell." t) | 
|  | 65 | (autoload 'run-erlang "erlang" "Start a new Erlang shell." t) | 
|  | 66 |  | 
|  | 67 | (autoload 'erlang-compile "erlang" | 
|  | 68 | "Compile Erlang module in current buffer." t) | 
|  | 69 |  | 
|  | 70 | (autoload 'erlang-man-module "erlang" | 
|  | 71 | "Find manual page for MODULE." t) | 
|  | 72 | (autoload 'erlang-man-function "erlang" | 
|  | 73 | "Find manual page for NAME, where NAME is module:function." t) | 
|  | 74 |  | 
|  | 75 | (autoload 'erlang-find-tag "erlang" | 
|  | 76 | "Like `find-tag'.  Capable of retreiving Erlang modules.") | 
|  | 77 | (autoload 'erlang-find-tag-other-window "erlang" | 
|  | 78 | "Like `find-tag-other-window'.  Capable of retreiving Erlang modules.") | 
|  | 79 |  | 
|  | 80 |  | 
|  | 81 | ;; | 
|  | 82 | ;; Associate files extensions ".erl" and ".hrl" with Erlang mode. | 
|  | 83 | ;; | 
|  | 84 |  | 
|  | 85 | (let ((a '("\\.erl\\'" . erlang-mode)) | 
|  | 86 | (b '("\\.hrl\\'" . erlang-mode))) | 
|  | 87 | (or (assoc (car a) auto-mode-alist) | 
|  | 88 | (setq auto-mode-alist (cons a auto-mode-alist))) | 
|  | 89 | (or (assoc (car b) auto-mode-alist) | 
|  | 90 | (setq auto-mode-alist (cons b auto-mode-alist)))) | 
|  | 91 |  | 
|  | 92 |  | 
|  | 93 | ;; | 
|  | 94 | ;; Ignore files ending in ".jam", ".vee", and ".beam" when performing | 
|  | 95 | ;; file completion. | 
|  | 96 | ;; | 
|  | 97 |  | 
|  | 98 | (let ((erl-ext '(".jam" ".vee" ".beam"))) | 
|  | 99 | (while erl-ext | 
|  | 100 | (let ((cie completion-ignored-extensions)) | 
|  | 101 | (while (and cie (not (string-equal (car cie) (car erl-ext)))) | 
|  | 102 | (setq cie (cdr cie))) | 
|  | 103 | (if (null cie) | 
|  | 104 | (setq completion-ignored-extensions | 
|  | 105 | (cons (car erl-ext) completion-ignored-extensions)))) | 
|  | 106 | (setq erl-ext (cdr erl-ext)))) | 
|  | 107 |  | 
|  | 108 |  | 
|  | 109 | ;; | 
|  | 110 | ;; The end. | 
|  | 111 | ;; | 
|  | 112 |  | 
|  | 113 | (provide 'erlang-start) | 
|  | 114 |  | 
|  | 115 | ;; erlang-start.el ends here. |