.emacs-my
changeset 359 ee15316c1126
parent 358 a6fb477c0e19
child 360 88e4e74c0b6c
equal deleted inserted replaced
358:a6fb477c0e19 359:ee15316c1126
   564 ;; (setq binary-process-input t)
   564 ;; (setq binary-process-input t)
   565 ;; (setq shell-file-name "bash")
   565 ;; (setq shell-file-name "bash")
   566 ;; (setq shell-command-switch "-c")
   566 ;; (setq shell-command-switch "-c")
   567 ;; (setenv "SHELL" shell-file-name)
   567 ;; (setenv "SHELL" shell-file-name)
   568 
   568 
       
   569 (defvar my-use-windows-shell nil
       
   570   "If t 'cmdproxy.exe' will be used as shell. Affect on M-x shell like
       
   571   commands. If nil, 'sh' will be used." )
       
   572 
   569 (when (eq window-system 'w32)           ; may require Cygwin or MSYS
   573 (when (eq window-system 'w32)           ; may require Cygwin or MSYS
   570   (setenv "ESHELL" "bash")
   574   (setenv "ESHELL" "bash")
   571   ;; Restore shell name if user set SHELL env var for Cygwin/MSYS.
   575   (if my-use-windows-shell
   572   (setq shell-file-name (concat exec-directory "cmdproxy.exe"))
   576       ;; Restore shell name if user set SHELL env var for Cygwin/MSYS.
       
   577       (setq shell-file-name (concat exec-directory "cmdproxy.exe"))
       
   578     ;; Use shell from Cygwin/MinGW.
       
   579     (setq shell-file-name "sh")
       
   580     )
   573   ;; (setq explicit-shell-file-name "bash")
   581   ;; (setq explicit-shell-file-name "bash")
   574   ;; (setq shell-file-name "bash")
       
   575   (setq explicit-bash-args '("-i"))
   582   (setq explicit-bash-args '("-i"))
   576   (setq explicit-sh-args '("-i"))
   583   (setq explicit-sh-args '("-i"))
   577   ;; Here is workaround: when explicit-shell-file-name is "bash" and shell-file-name is "cmdproxy.exe"
   584   ;; Here is workaround: when explicit-shell-file-name is "bash" and shell-file-name is "cmdproxy.exe"
   578   ;; find-dired incorrect quote args (in shell-quote-argument (w32-shell-name) return "bash", but
   585   ;; find-dired incorrect quote args (in shell-quote-argument (w32-shell-name) return "bash", but
   579   ;; shell-command used shell-file-name which value "cmdproxy.exe"). So I put additional space in pattern to
   586   ;; shell-command used shell-file-name which value "cmdproxy.exe"). So I put additional space in pattern to