Emacs config utilizing prelude as a base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
3.5 KiB

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