.emacs-my
changeset 388 c7a4c56c60ec
parent 387 7340a863ae23
child 389 b11171df86df
equal deleted inserted replaced
387:7340a863ae23 388:c7a4c56c60ec
   633 (defvar my-use-windows-shell nil
   633 (defvar my-use-windows-shell nil
   634   "If t 'cmdproxy.exe' will be used as shell. Affect on M-x shell like
   634   "If t 'cmdproxy.exe' will be used as shell. Affect on M-x shell like
   635   commands. If nil, 'sh' will be used." )
   635   commands. If nil, 'sh' will be used." )
   636 
   636 
   637 (when (eq window-system 'w32)           ; may require Cygwin or MSYS
   637 (when (eq window-system 'w32)           ; may require Cygwin or MSYS
   638   (setenv "ESHELL" "bash")
   638   (if my-use-windows-shell
   639   (when my-use-windows-shell
   639       (prog
   640     ;; Restore shell name if user set SHELL env var for Cygwin/MSYS.
   640        ;; Restore shell name if user set SHELL env var for Cygwin/MSYS.
   641     (setq shell-file-name (concat exec-directory "cmdproxy.exe"))
   641        (setq shell-file-name (concat exec-directory "cmdproxy.exe"))
   642     ;; Here is workaround: when explicit-shell-file-name is "bash" and shell-file-name is "cmdproxy.exe"
   642        ;; Here is workaround: when explicit-shell-file-name is "bash" and shell-file-name is "cmdproxy.exe"
   643     ;; find-dired incorrect quote args (in shell-quote-argument (w32-shell-name) return "bash", but
   643        ;; find-dired incorrect quote args (in shell-quote-argument (w32-shell-name) return "bash", but
   644     ;; shell-command used shell-file-name which value "cmdproxy.exe"). So I put additional space in pattern to
   644        ;; shell-command used shell-file-name which value "cmdproxy.exe"). So I put additional space in pattern to
   645     ;; prevent quoting.
   645        ;; prevent quoting.
   646     (setq find-ls-option '("-exec ls -ld {}  ;" . "-ld"))
   646        (setq find-ls-option '("-exec ls -ld {}  ;" . "-ld"))
       
   647        )
       
   648     (prog
       
   649      ;; Use shell from Cygwin/MinGW.
       
   650      (setq shell-file-name "sh")
       
   651      )
   647     )
   652     )
   648   ;; (setq explicit-shell-file-name "bash")
   653   ;; (setq explicit-shell-file-name "bash")
   649   (setq explicit-bash-args '("-i"))
   654   (setq explicit-bash-args '("-i"))
   650   (setq explicit-sh-args '("-i"))
   655   (setq explicit-sh-args '("-i"))
   651   )
   656   )