From 0aa00bf691e62e5926932f860b8000d46c136674 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 5 Apr 2015 20:59:52 +0900 Subject: [PATCH] Fix some prefs for darwin environment --- emacs.el | 8 ++++++-- shrc | 8 +++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/emacs.el b/emacs.el index a5d92c0..e7d6c37 100644 --- a/emacs.el +++ b/emacs.el @@ -942,8 +942,12 @@ IF OK-IF-ALREADY-EXISTS is true force download." (number-to-string (emacs-pid)))) ;; In Cygwin Environment `server-runnning-p' stops when server-use-tcp is nil - (when (eq system-type - 'cygwin) + ;; In Darwin environment, init fails with message like 'Service name too long' + ;; when server-use-tcp is nil + (when (or (eq system-type + 'cygwin) + (eq system-type + 'darwin)) (setq server-use-tcp t)) (defun my-construct-emacsclient-editor-command () diff --git a/shrc b/shrc index 3ab91c3..f715f24 100755 --- a/shrc +++ b/shrc @@ -613,7 +613,13 @@ __realpath(){ fi } -__safe_alias tmux='env -u SHLVL tmux' +if $isdarwin +then + # I want to use env -u, but darwin env does not provide this option + __safe_alias tmux='SHLVL= tmux' +else + __safe_alias tmux='env -u SHLVL tmux' +fi tx(){ tmux start-server if test -z "$1"