Use message.el -provided function message-add-actions to
set(/add) #'save-buffers-kill-terminal into the message-exit-actions
list.
# Kill the terminal/frame if we're creating one.
if [ -z "$USE_EMACSCLIENT" -o -n "$CREATE_FRAME" -o -n "$NO_WINDOW" ]; then
# Kill the terminal/frame if we're creating one.
if [ -z "$USE_EMACSCLIENT" -o -n "$CREATE_FRAME" -o -n "$NO_WINDOW" ]; then
- ELISP="${ELISP} (setq message-exit-actions (list #'save-buffers-kill-terminal))"
+ ELISP="${ELISP} (message-add-action #'save-buffers-kill-terminal 'exit)"