 
 ;; smex-mode
 ;; bind Caps-Lock to smex
-(if (eq window-system 'x)
+(when (eq window-system 'x)
     (shell-command "xmodmap -e 'clear Lock' -e 'keycode 66 = F13'"))
 (global-set-key [f13] 'smex)
 (global-set-key (kbd "M-x") 'smex)


;; Private setup, passwords and key
(let ((private-file "~/.emacs.d/private.el"))
  (if (file-readable-p private-file)
      (load-file private-file)))

      tramp-default-method "scp")

;; web-beautify mode
(when (eq system-type 'darwin)
  (setenv "PATH" (concat "/usr/local/bin:" (getenv "PATH"))))
(eval-after-load 'js2-mode
  '(define-key js2-mode-map (kbd "C-c w") 'web-beautify-js))
(eval-after-load 'json-mode
