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 (if my-use-windows-shell |
638 (if my-use-windows-shell |
639 (prog |
639 (progn |
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 ) |
647 ) |
648 (prog |
648 (progn |
649 ;; Use shell from Cygwin/MinGW. |
649 ;; Use shell from Cygwin/MinGW. |
650 (setq shell-file-name "sh") |
650 (setq shell-file-name "sh") |
651 ) |
651 ) |
652 ) |
652 ) |
653 ;; (setq explicit-shell-file-name "bash") |
653 ;; (setq explicit-shell-file-name "bash") |