diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2013-09-12 10:35:30 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2013-09-12 10:35:30 +0200 |
commit | 209a3681f1be5d72a4de5a36233da838db54cb3c (patch) | |
tree | 509e961af3345ea0ebc90b74184745ef213c7086 /emacs-helm.sh | |
parent | a4a8b5c15256aeed82adfeba3ef1c67f3d03de9a (diff) |
* emacs-helm.sh: Allow giving path of Emacs on command line.
Diffstat (limited to 'emacs-helm.sh')
-rwxr-xr-x | emacs-helm.sh | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/emacs-helm.sh b/emacs-helm.sh index cf5ba28d..9d62bc96 100755 --- a/emacs-helm.sh +++ b/emacs-helm.sh @@ -24,10 +24,25 @@ TMP="/tmp/helm-cfg.el" LOADPATH=`dirname $0` +EMACS=emacs + +case $1 in + -P) + shift 1 + declare EMACS=$1 + shift 1 + ;; + -h) + echo "Usage: ${0##*/} [-P} Emacs path [-h} help [--] EMACS ARGS" + exit 2 + ;; +esac + cat > $TMP <<EOF (setq initial-scratch-message (concat initial-scratch-message ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ -;; This Emacs is Powered by \`HELM'.\n\ +;; This Emacs is Powered by \`HELM' using\n\ +;; emacs program \"$EMACS\".\n\ ;; This is a minimal \`helm' configuration to discover \`helm' or debug it.\n\ ;; You can retrieve this minimal configuration in \"$TMP\" \n\ ;; Some originals emacs commands have been replaced by own \`helm' commands:\n\n\ @@ -55,4 +70,7 @@ cat > $TMP <<EOF (add-hook 'kill-emacs-hook #'(lambda () (delete-file "$TMP"))) (cd "~/") EOF -emacs -Q -l $TMP $@ + +$EMACS -Q -l $TMP $@ + +exit 0 |