Add prelude-update command

This commit is contained in:
Bozhidar Batsov 2013-03-11 20:13:06 +02:00
parent 112c3cca70
commit 925d624f46
2 changed files with 11 additions and 0 deletions

View file

@ -101,6 +101,8 @@ $ git pull
The `path/to/prelude/installation` is usually `~/.emacs.d` (at least The `path/to/prelude/installation` is usually `~/.emacs.d` (at least
on Unix systems). on Unix systems).
Alternatively you can run <kbd>M-x prelude-update</kbd> from Emacs itself.
It's generally a good idea to stop Emacs before you do the update. The It's generally a good idea to stop Emacs before you do the update. The
next time Prelude starts it will install any new dependencies (if next time Prelude starts it will install any new dependencies (if
there are such). there are such).

View file

@ -327,5 +327,14 @@ Doesn't mess with special buffers."
(exchange-point-and-mark) (exchange-point-and-mark)
(deactivate-mark nil)) (deactivate-mark nil))
(defun prelude-update ()
"Update Prelude to its latest version."
(interactive)
(when (y-or-n-p "Do you want to update Prelude?")
(message "Updating Prelude...")
(cd prelude-dir)
(shell-command "git pull")
(message "Update finished. Restart Emacs to complete the process.")))
(provide 'prelude-core) (provide 'prelude-core)
;;; prelude-core.el ends here ;;; prelude-core.el ends here