15 lines
456 B
Bash
Executable File
15 lines
456 B
Bash
Executable File
#!/bin/sh
|
|
## Note: we do not use the (-a "") parameters of emacsclient to auto start the
|
|
## daemon since we want to pass additional parameters to emacs.
|
|
|
|
if [ "${0##*/}" = "emc" ]; then
|
|
param="-t"
|
|
elif [ -z "$DISPLAY" ]; then
|
|
param="-nc"
|
|
else
|
|
param=$(emacs --batch -Q --eval='(if (fboundp '"'"'tool-bar-mode) (message "-nc") (message "-t"))' 2>&1)
|
|
fi
|
|
|
|
[ ! -e /tmp/emacs$(id -u)/server ] && emacs --daemon --no-site-file
|
|
emacsclient $param "$@"
|