diff options
author | Ulrich Müller <ulm@gentoo.org> | 2013-08-06 21:09:42 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2013-08-06 21:09:42 +0200 |
commit | f7ce8ab15e5ccb0f2c4acc038d0442e28a6d7fa0 (patch) | |
tree | a2710e851e0af05acdea42b99fe098fb0f6728a9 | |
parent | Comment changes; refer to the emacs binary in lower case. (diff) | |
download | emacs-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-- | ChangeLog | 7 | ||||
-rw-r--r-- | emacs-stop.sh | 3 | ||||
-rw-r--r-- | emacs.conf | 4 | ||||
-rw-r--r-- | emacs.rc | 3 |
4 files changed, 15 insertions, 2 deletions
@@ -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=$! @@ -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. @@ -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 |