1(if (equal window-system 'w32)
3;;define funct's to allow maximisation on startup
5 (defun w32-restore-frame ()
6 "Restore a minimized frame"
8 (w32-send-sys-command 61728))
10 (defun w32-maximize-frame ()
11 "Maximize the current frame"
14 (w32-send-sys-command 61488)
17 (add-hook 'window-setup-hook 'w32-maximize-frame t)
19 (require-if-exists 'w32-browser)
20 (require-if-exists 'w32-find-dired)
21 (require-if-exists 'w32shell)
23 ;;Bind C-xC-g to w32-find-dired
24 (global-set-key "\C-x\C-g" 'w32-find-dired)
26 ;; Tramp stuff for windows:
27 (setq tramp-default-method "plink")
29 ;; Add aspell support instead of ispell
30 ;; Do some kind of existance checking?
31 (setq ispell-program-name "c:/progra~1/aspell/bin/aspell.exe")
32 (setq ispell-dictionary "british")
34 ;; via http://zhangda.wordpress.com/2010/02/03/open-the-path-of-the-current-buffer-within-emacs/
35 (defun open-buffer-path ()
36 "Run explorer on the directory of the current buffer."
38 (shell-command (concat "explorer " (replace-regexp-in-string "/" "\\\\" (file-name-directory (buffer-file-name)) t t))))
40 ;; via http://slashusr.wordpress.com/2010/01/20/emacs-function-to-add-new-path-elements-to-the-path-environment-variable/
41 (defun add-dir-to-path (path-element)
42 "Add the specified path element to the Emacs PATH"
43 (interactive "DEnter directory to be added to path: ")
44 (if (file-directory-p path-element)
46 (concat (expand-file-name path-element)
47 path-separator (getenv "PATH")))))