.emacs-my
changeset 746 f7ce19afa666
parent 745 81e7f065031c
child 747 dd1d88804512
equal deleted inserted replaced
745:81e7f065031c 746:f7ce19afa666
   308   (setq null-device "/dev/null")
   308   (setq null-device "/dev/null")
   309   ;; Use shell from Cygwin/MinGW.
   309   ;; Use shell from Cygwin/MinGW.
   310   (setq shell-file-name "bash")
   310   (setq shell-file-name "bash")
   311   (setenv "SHELL" "/bin/bash")
   311   (setenv "SHELL" "/bin/bash")
   312   (modify-coding-system-alist 'process "bash" '(cp1251-unix . cp1251-unix))
   312   (modify-coding-system-alist 'process "bash" '(cp1251-unix . cp1251-unix))
       
   313   )
       
   314 
       
   315 (when (eq window-system 'w32)
       
   316   ;; Fix 'starttls.el' on native Windows Emacs with gnutls-cli from Cygwin.
       
   317   ;; 'gnutls-cli' run with '-s' opt and process wait for SIGALRM.
       
   318   ;; But build-in native Emacs 'kill' command can not send such Cygwin
       
   319   ;; specific sygnal. So 'starttls-negotiate-gnutls' function infinitely
       
   320   ;; wait for 'gnutls-cli' output.
       
   321   (defadvice signal-process (around cygwin (process sigcode))
       
   322     "Use 'kill.exe' instead build-in Emacs 'kill'."
       
   323     (if (eq sigcode 'SIGALRM)
       
   324         (shell-command
       
   325          (format "kill.exe -s SIGALRM %d"
       
   326                  (if (processp process) (process-id process) process)))
       
   327       ad-do-it
       
   328       ))
       
   329   (ad-activate 'signal-process)
   313   )
   330   )
   314 
   331 
   315 (ansi-color-for-comint-mode-on)
   332 (ansi-color-for-comint-mode-on)
   316 
   333 
   317 (setq explicit-bash-args '("-i"))
   334 (setq explicit-bash-args '("-i"))