From 638ff52e0bf09a2b3c2333caf01ca1eb08aed7b5 Mon Sep 17 00:00:00 2001 From: Sebastian Wiesner Date: Fri, 22 Aug 2014 13:55:33 +0200 Subject: [PATCH] Improve Emacs setup instructions Use parse-colon-path instead of split-string, preserve exec-directory in exec-path, and add an absolute directory to load-path. --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d8d3aba..e1b2781 100644 --- a/README.md +++ b/README.md @@ -120,10 +120,12 @@ you can copy-paste this code into you `~/.emacs` file: (setenv (car var) (cadr var))) ;; Update the emacs path -(setq exec-path (split-string (getenv "PATH") path-separator)) +(setq exec-path (append (parse-colon-path (getenv "PATH")) + (list exec-directory))) ;; Update the emacs load path -(push (concat (getenv "OCAML_TOPLEVEL_PATH") "/../../share/emacs/site-lisp") load-path) +(add-to-list 'load-path (expand-file-name "../../share/emacs/site-lisp" + (getenv "OCAML_TOPLEVEL_PATH"))) ;; Automatically load utop.el (autoload 'utop "utop" "Toplevel for OCaml" t)