2013-07-10 18:31:13 +02:00
|
|
|
#!/bin/sh
|
|
|
|
if [ -z "$DISPLAY" ]; then
|
2013-11-01 20:33:17 +01:00
|
|
|
IS_GRAPHICAL=true
|
2013-07-10 18:31:13 +02:00
|
|
|
else
|
2013-11-01 20:33:17 +01:00
|
|
|
IS_GRAPHICAL=$(emacs --batch -Q --eval='(if (fboundp '"'"'tool-bar-mode) (message "true") (message "false"))' 2>&1)
|
2013-07-10 18:31:13 +02:00
|
|
|
fi
|
|
|
|
|
2013-11-01 20:33:17 +01:00
|
|
|
if $IS_GRAPHICAL; then
|
2013-07-10 18:31:13 +02:00
|
|
|
emacsclient -a "" -nc "$@"
|
|
|
|
else
|
|
|
|
emacsclient -a "" -t "$@"
|
|
|
|
fi
|