changeset 625:a20bc9fb1ada

Prefer Cygwin emacs-w32.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Fri, 27 Jan 2017 19:39:59 +0200
parents cdd537cc93f7
children 1c9a38aa47bd
files emacs/e
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/emacs/e	Fri Jan 27 19:25:24 2017 +0200
+++ b/emacs/e	Fri Jan 27 19:39:59 2017 +0200
@@ -17,16 +17,22 @@
     ;;
 esac
 
+emacs_cmd=emacs
+if [ -n "$COMSPEC" ]; then
+    # We probably under Windows like OS. I like Cygwin emacs-w32.
+    emacs_cmd=emacs-w32
+fi
+
 case ${0##*/} in
-  ew) args="-a emacs" ;;
+  ew) args="-a ${emacs_cmd}" ;;
   ec) args="-c" ;;
   et) args="-t" ;;
-  *) args="-a emacs -n" ;;
+  *) args="-a ${emacs_cmd} -n" ;;
 esac
 
 if [ -n "$COMSPEC" ]; then
-  # We probably under Windows like OS. I like native Emacs over Cygwin.
-  exec emacsclientw $args -- "$@"
+    # We probably under Windows like OS. I like Cygwin emacs-w32.
+    exec run emacsclient-w32 $args -- "$@"
 fi
 
 f=`readlink -f "$1"`