Skip to content

Instantly share code, notes, and snippets.

@hanazuki
Created May 4, 2015 12:35
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 hanazuki/26f6f8c6dc71452a7608 to your computer and use it in GitHub Desktop.
Save hanazuki/26f6f8c6dc71452a7608 to your computer and use it in GitHub Desktop.
emacs wrapper
#!/bin/bash
if [ -z "$EMACS" ]; then
{
IFS=:
for path in $PATH; do
if [ -x "$path/emacs" -a ! "$path/emacs" -ef "$BASH_SOURCE" ]; then
EMACS="$path/emacs"
break
fi
done
}
fi
if [[ "${1%%=*}" = --daemon ]]; then
exec "$EMACS" --no-site-file "$@"
else
exec "$EMACS" "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment