[erlang-questions] erlang emacsmode problem

Tuncer Ayaz tuncer.ayaz@REDACTED
Sat Jun 28 21:10:29 CEST 2008


On Thu, Jun 26, 2008 at 10:16 AM, Tuncer Ayaz <tuncer.ayaz@REDACTED> wrote:
> On Thu, Jun 26, 2008 at 9:54 AM, Dominic Williams
> <erlang@REDACTED> wrote:
>> Hi,
>>
>>> Double check your paths. Make sure they actually exist as written. If
>>> you've been getting this error since the upgrade to R12B-3 the cause
>>> of the error should be obvious.
>>
>> And if that was your problem, you could use some more flexible emacs-lisp
>> such as this (no hard-coded tools-x.y.z version):
>
> I think it's obvious but in case someone is possibly missing this
> little bit of info the following or something more Emacs-idiomatic
> should be done before that:
> (if (or (eq system-type 'windows-nt)
>        (eq system-type 'ms-dos))
>        (setq erlang-root-dir "C:/erlang")
>  (setq erlang-root-dir "/usr/local/otp")
> )

If you configure & build Erlang without any --prefix setting
it will be installed to /usr/local/lib/erlang:

(if (or (eq system-type 'windows-nt)
       (eq system-type 'ms-dos))
       (setq erlang-root-dir "C:/erlang")
 (setq erlang-root-dir "/usr/local/lib/erlang")
)

>> (if
>>    (not (boundp 'erlang-root-dir))
>>    (message "Skipping erlang-mode: erlang-root-dir not defined")
>>  (progn
>>    (set 'erlang-bin (concat erlang-root-dir "/bin/"))
>>    (set 'erlang-lib (concat erlang-root-dir "/lib/"))
>>    (if
>>        (not (boundp 'erlang-mode-path))
>>        (set 'erlang-mode-path
>>             (concat
>>              erlang-lib
>>              (file-name-completion "tools-" erlang-lib)
>>              "emacs/erlang.el")))
>>    (if
>>        (and
>>         (file-readable-p erlang-mode-path)
>>         (file-readable-p erlang-bin))
>>        (progn
>>          (message "Setting up erlang-mode")
>>          (set 'exec-path (cons erlang-bin exec-path))
>>          (set 'load-path (cons
>>                           (concat
>>                            erlang-lib
>>                            (file-name-completion "tools-" erlang-lib)
>>                            "emacs")
>>                           load-path))
>>          (set 'load-path (cons (file-name-directory erlang-mode-path) load-path))
>>          (require 'erlang-start))
>>      (message "Skipping erlang-mode: %s and/or %s not readable"
>> erlang-bin erlang-mode-path))))
>>
>> Regards,
>>
>> Dominic Williams
>> http://dominicwilliams.net
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://www.erlang.org/mailman/listinfo/erlang-questions
>>
>



More information about the erlang-questions mailing list