Chen Yu
Chen Yu

Reputation: 4077

how to use updated .erlang file without reopening emacs?

In my .emacs, It contains the following two parts of codes.

I am debugging two programs together, one is server, and the other is client.

Everytime switching the debuged program, it is necessary to modify the .erlang for switching the code:add_paths statements and reopening the emacs. (In server and client programs, 3 modules are same, if not switching, the module conflict.

Because reopening emacs is much time-costing ( many files have to be reopened), is it possible for make two .erlang file effective with reopening emacs.

        (erlang-shell)




    (add-hook 'erlang-mode-hook

          (lambda ()
             (setq inferior-erlang-machine-options '("-name" "emacs"))
            ;(setq inferior-erlang-machine-options '("-name" "emacs""-mnesia dir" 
"/Users/yuchen/Documents
/Project/mnesia_db") )
                 (set (make-local-variable 'compile-command) (format "make -f %s" 
(get-closest-pathname)))
            (imenu-add-to-menubar "imenu")))

Upvotes: 0

Views: 180

Answers (1)

Alex Ott
Alex Ott

Reputation: 87119

You just need to finish your erlang session (switch to *erlang* buffer, enter q(). and press ENTER), edit ~/.erlang and start erlang again with erlang-shell

Upvotes: 2

Related Questions