.emacs-my
changeset 1532 e6ea63ccab39
parent 1531 59d0e2ab77f1
child 1533 bf21c20118b4
equal deleted inserted replaced
1531:59d0e2ab77f1 1532:e6ea63ccab39
   531   ;; Workaround for Cygwin when 'shell-file-name' is 'bash'.
   531   ;; Workaround for Cygwin when 'shell-file-name' is 'bash'.
   532   (setq null-device "/dev/null")
   532   (setq null-device "/dev/null")
   533   ;; Use shell from Cygwin/MinGW.
   533   ;; Use shell from Cygwin/MinGW.
   534   (setq shell-file-name "bash")
   534   (setq shell-file-name "bash")
   535   (setenv "SHELL" "/bin/bash")
   535   (setenv "SHELL" "/bin/bash")
   536   (modify-coding-system-alist 'process "bash" '(cp1251-unix . cp1251-unix))
   536   ;; (modify-coding-system-alist 'process "bash" '(cp1251-unix . cp1251-unix))
   537   )
   537   )
   538 
   538 
   539 (when (eq system-type 'windows-nt)
   539 (when (eq system-type 'windows-nt)
   540   ;; Fix 'starttls.el' on native Windows Emacs with gnutls-cli from Cygwin.
   540   ;; Fix 'starttls.el' on native Windows Emacs with gnutls-cli from Cygwin.
   541   ;; 'gnutls-cli' run with '-s' opt and process wait for SIGALRM.
   541   ;; 'gnutls-cli' run with '-s' opt and process wait for SIGALRM.
   992 
   992 
   993 (modify-coding-system-alist 'file "\\.el" 'iso-2022-7bit)
   993 (modify-coding-system-alist 'file "\\.el" 'iso-2022-7bit)
   994 (cond
   994 (cond
   995  ((equal window-system 'w32)          ; also (string-equal system-type "windows-nt")
   995  ((equal window-system 'w32)          ; also (string-equal system-type "windows-nt")
   996   ;; (set-selection-coding-system 'utf-16-le-dos)
   996   ;; (set-selection-coding-system 'utf-16-le-dos)
   997   (setq-default buffer-file-coding-system 'cp1251)
   997   ;; (setq-default buffer-file-coding-system 'cp1251)
   998   (setq default-file-name-coding-system 'cp1251)
   998   ;; (setq default-file-name-coding-system 'cp1251)
   999   (setq default-process-coding-system '(cp1251 . cp1251))
   999   ;; (setq default-process-coding-system '(cp1251 . cp1251))
  1000   )
  1000   )
  1001  ((equal window-system 'x)
  1001  ((equal window-system 'x)
  1002   (prefer-coding-system 'utf-8-unix)
  1002   (prefer-coding-system 'utf-8-unix)
  1003   (setq selection-coding-system nil)
  1003   (setq selection-coding-system nil)
  1004   (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
  1004   (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
  1005   (modify-coding-system-alist 'process ".*" 'utf-8-unix)
  1005   (modify-coding-system-alist 'process ".*" 'utf-8-unix)
  1006   )
  1006   )
  1007  ((eq system-type 'cygwin)
  1007  ((eq system-type 'cygwin)
  1008   (when (and (getenv "LANG") (string-match "1251\\'" (getenv "LANG")))
  1008   (when (and (getenv "LANG") (string-match "1251\\'" (getenv "LANG")))
  1009     (prefer-coding-system 'cp1251-unix)
  1009     ;; (prefer-coding-system 'cp1251-unix)
  1010     (prefer-coding-system 'utf-8-unix)
  1010     (prefer-coding-system 'utf-8-unix)
  1011     (modify-coding-system-alist 'process ".*" 'cp1251-unix)
  1011     ;; (modify-coding-system-alist 'process ".*" 'cp1251-unix)
  1012     )
  1012     )
  1013   )
  1013   )
  1014  ((eq system-type 'darwin)
  1014  ((eq system-type 'darwin)
  1015   nil
  1015   nil
  1016   )
  1016   )
  3116 (defun my-python-mode-hook ()
  3116 (defun my-python-mode-hook ()
  3117   (when (and (eq window-system 'w32) (fboundp 'prettify-symbols-mode))
  3117   (when (and (eq window-system 'w32) (fboundp 'prettify-symbols-mode))
  3118     (prettify-symbols-mode -1)))
  3118     (prettify-symbols-mode -1)))
  3119 (add-hook 'python-mode-hook 'my-python-mode-hook)
  3119 (add-hook 'python-mode-hook 'my-python-mode-hook)
  3120 
  3120 
  3121 (when (equal window-system 'w32)
  3121 ;; (when (equal window-system 'w32)
  3122   (add-to-list 'process-coding-system-alist '("python" cp1251-unix . cp1251-unix)))
  3122 ;;   (add-to-list 'process-coding-system-alist '("python" cp1251-unix . cp1251-unix)))
  3123 
  3123 
  3124 (add-to-list 'auto-mode-alist '("/requirements.txt\\'" . conf-mode))
  3124 (add-to-list 'auto-mode-alist '("/requirements.txt\\'" . conf-mode))
  3125 
  3125 
  3126 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3126 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3127 (message "perl, cperl")
  3127 (message "perl, cperl")