Skip to content

Instantly share code, notes, and snippets.

@dakrone
Created December 11, 2014 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dakrone/e76d9727995b8a7911a2 to your computer and use it in GitHub Desktop.
Save dakrone/e76d9727995b8a7911a2 to your computer and use it in GitHub Desktop.
(defun add-to-path (path-element)
"Add the specified path element to the Emacs PATH"
(interactive "DEnter directory to be added to path: ")
(if (file-directory-p path-element)
(setenv "PATH"
(concat (expand-file-name path-element)
path-separator (getenv "PATH")))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment