From 925d624f4695d46e4b27c1c1b3be67f34a3ea3eb Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Mon, 11 Mar 2013 20:13:06 +0200 Subject: [PATCH] Add prelude-update command --- README.md | 2 ++ core/prelude-core.el | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index 0431a6d..1958955 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,8 @@ $ git pull The `path/to/prelude/installation` is usually `~/.emacs.d` (at least on Unix systems). +Alternatively you can run M-x prelude-update from Emacs itself. + 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 there are such). diff --git a/core/prelude-core.el b/core/prelude-core.el index 5aab378..c215cbc 100644 --- a/core/prelude-core.el +++ b/core/prelude-core.el @@ -327,5 +327,14 @@ Doesn't mess with special buffers." (exchange-point-and-mark) (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) ;;; prelude-core.el ends here