Posted By

bigfaceworm on 08/21/09


Tagged

emacs dot reload LISP


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

jmignault
darkhawk
ef


reload-dot-emacs


 / Published in: Emacs Lisp
 

URL: http://stackoverflow.com/questions/41522/tips-for-learning-elisp/59589#59589

An answer to the 'reload-dot-emacs exercise found here: http://stackoverflow.com/questions/41522/tips-for-learning-elisp/59589#59589

  1. (defun reload-dot-emacs ()
  2. "Save the .emacs buffer if needed, then reload .emacs."
  3. (interactive)
  4. (let ((dot-emacs "~/.emacs"))
  5. (and (get-file-buffer dot-emacs)
  6. (save-buffer (get-file-buffer dot-emacs)))
  7. (load-file dot-emacs))
  8. (message "Re-initialized!"))

Report this snippet  

You need to login to post a comment.