Rename .emacs if it exists in the installer(#1037)
If user has a $HOME/.emacs file, the prelude installer script will install just fine, but when starting emacs, nothing will take effect because emacs doesn't load .emacs.d/init.el if .emacs exists. Because this is confusing for new users, the installer should default to renaming this file to make emacs actually load prelude.
This commit is contained in:
parent
ccedc77285
commit
086c389b1d
1 changed files with 7 additions and 0 deletions
|
@ -179,6 +179,13 @@ then
|
|||
printf "$YELLOW WARNING:$RESET Prelude depends on emacs $RED 24$RESET !\n"
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.emacs" ]
|
||||
then
|
||||
## If $HOME/.emacs exists, emacs ignores prelude's init.el, so remove it
|
||||
printf " Backing up the existing $HOME/.emacs to $HOME/.emacs.pre-prelude\n"
|
||||
mv $HOME/.emacs $HOME/.emacs.pre-prelude
|
||||
fi
|
||||
|
||||
if [ -d "$PRELUDE_INSTALL_DIR" ] || [ -f "$PRELUDE_INSTALL_DIR" ]
|
||||
then
|
||||
# Existing file/directory found -> backup
|
||||
|
|
Loading…
Reference in a new issue