aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2013-08-06 21:09:42 +0200
committerUlrich Müller <ulm@gentoo.org>2013-08-06 21:09:42 +0200
commitf7ce8ab15e5ccb0f2c4acc038d0442e28a6d7fa0 (patch)
treea2710e851e0af05acdea42b99fe098fb0f6728a9
parentComment changes; refer to the emacs binary in lower case. (diff)
downloademacs-tools-f7ce8ab15e5ccb0f2c4acc038d0442e28a6d7fa0.tar.gz
emacs-tools-f7ce8ab15e5ccb0f2c4acc038d0442e28a6d7fa0.tar.bz2
emacs-tools-f7ce8ab15e5ccb0f2c4acc038d0442e28a6d7fa0.zip
New variable EMACSCLIENT_OPTS.
* emacs-stop.sh: New variable EMACSCLIENT_OPTS, allows to specify additional options for emacsclient. * emacs.rc (stop): Export EMACSCLIENT_OPTS to environment. * emacs.conf: Add explanation for new variable.
-rw-r--r--ChangeLog7
-rw-r--r--emacs-stop.sh3
-rw-r--r--emacs.conf4
-rw-r--r--emacs.rc3
4 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1e1b769..75c0d8f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-08-06 Ulrich Müller <ulm@gentoo.org>
+
+ * emacs-stop.sh: New variable EMACSCLIENT_OPTS, allows to specify
+ additional options for emacsclient.
+ * emacs.rc (stop): Export EMACSCLIENT_OPTS to environment.
+ * emacs.conf: Add explanation for new variable.
+
2013-03-23 Ulrich Müller <ulm@gentoo.org>
* Version 0.20 released.
diff --git a/emacs-stop.sh b/emacs-stop.sh
index fececd7..58aaeef 100644
--- a/emacs-stop.sh
+++ b/emacs-stop.sh
@@ -6,7 +6,8 @@
# Any additional commands should preferably be added to kill-emacs-hook.
EMACS_LISP_EXPR="(kill-emacs)"
-su "${USER}" -c "${EMACSCLIENT} --eval \"${EMACS_LISP_EXPR}\"" \
+su "${USER}" \
+ -c "${EMACSCLIENT} ${EMACSCLIENT_OPTS} --eval \"${EMACS_LISP_EXPR}\"" \
</dev/null &>/dev/null &
pid=$!
diff --git a/emacs.conf b/emacs.conf
index dce7d78..4c7549c 100644
--- a/emacs.conf
+++ b/emacs.conf
@@ -22,6 +22,10 @@
# Options to pass to emacs. Don't remove "--daemon".
#EMACS_OPTS="--daemon"
+# Options to pass to emacsclient. This variable is only used if you
+# call emacsclient from a custom stop script, see EMACS_STOP above.
+#EMACSCLIENT_OPTS=""
+
# The SHELL variable to be passed to EMACS_START. emacs-wrapper.sh uses
# this as the user's login shell. If (explicitly set to) empty, then
# the shell field from the passwd file is used.
diff --git a/emacs.rc b/emacs.rc
index 3ab53f7..b7ee39c 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -67,7 +67,8 @@ start() {
stop() {
# Optionally, call a custom script before stopping.
if [ "${EMACS_STOP}" ] && [ -x "${EMACS_STOP}" ]; then
- export USER PIDFILE EMACS EMACSCLIENT EMACS_TIMEOUT EMACS_DEBUG
+ export USER PIDFILE EMACS EMACS_TIMEOUT EMACS_DEBUG
+ export EMACSCLIENT EMACSCLIENT_OPTS
ebegin "Calling Emacs stop script for ${USER}"
"${EMACS_STOP}"
eend $? || return