(eq window-system 'w32) ==> (eq system-type 'windows-nt) to correctly handle
authorOleksandr Gavenko <gavenkoa@gmail.com>
Wed, 18 May 2016 15:47:16 +0300
changeset 1402 b1a1c92a7f55
parent 1401 8856efafc5fe
child 1403 a04175d20f08
(eq window-system 'w32) ==> (eq system-type 'windows-nt) to correctly handle Cygwin w32 Emacs version.
.emacs-my
--- a/.emacs-my	Wed May 18 15:11:29 2016 +0300
+++ b/.emacs-my	Wed May 18 15:47:16 2016 +0300
@@ -441,7 +441,7 @@
 (eval-when 'compile (require 'shell))
 
 ;; Activate Cygwin for native Windows Emacs if available.
-(when (and (eq window-system 'w32) (require 'cygwin-mount nil t))
+(when (and (eq system-type 'windows-nt) (require 'cygwin-mount nil t))
   (cygwin-mount-activate))
 
 (defvar my-use-windows-shell nil
@@ -496,7 +496,7 @@
   (modify-coding-system-alist 'process "bash" '(cp1251-unix . cp1251-unix))
   )
 
-(when (eq window-system 'w32)
+(when (eq system-type 'windows-nt)
   ;; Fix 'starttls.el' on native Windows Emacs with gnutls-cli from Cygwin.
   ;; 'gnutls-cli' run with '-s' opt and process wait for SIGALRM.
   ;; But build-in native Emacs 'kill' command can not send such Cygwin
@@ -514,7 +514,7 @@
   (modify-coding-system-alist 'process "gnutls-cli" '(binary . binary))
   )
 
-(when (eq window-system 'w32)
+(when (eq system-type 'windows-nt)
   (add-to-list 'exec-suffixes ".py")
   (add-to-list 'exec-suffixes ".sh")
   (defun executable-find (command) (locate-file command exec-path exec-suffixes))
@@ -867,8 +867,7 @@
 ;; Paste at point NOT at cursor
 (setq mouse-yank-at-point t)
 (when window-system
-  (mouse-wheel-mode 1)
-  )
+  (mouse-wheel-mode 1))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (message "key binding, short-keys")
@@ -1116,8 +1115,7 @@
 ;; Make behaviour same as in GUI.
 (unless window-system
   (define-key dired-mode-map (kbd "DEL") 'my-dired-up-dir)
-  (define-key dired-mode-map (kbd "RET") 'my-dired-enter-to-dir)
-  )
+  (define-key dired-mode-map (kbd "RET") 'my-dired-enter-to-dir))
 
 ;; Enable 'a' command.
 (put 'dired-find-alternate-file 'disabled nil)
@@ -1447,9 +1445,9 @@
 (message "info")
 
 (unless (getenv "INFOPATH")
-  (if (not (eq window-system 'w32))
-      (setenv "INFOPATH" (expand-file-name "~/usr/share/info:"))
-    (setenv "INFOPATH" (concat (expand-file-name "~/usr/share/info") ":/usr/share/info:"))))
+  (if (eq system-type 'windows-nt)
+      (setenv "INFOPATH" (concat (expand-file-name "~/usr/share/info") ":/usr/share/info:"))
+    (setenv "INFOPATH" (expand-file-name "~/usr/share/info:"))))
 
 ;; Assume that cygwin-mount already activated.
 (when (featurep 'cygwin-mount)