changelog shortlog tags changeset files revisions annotate raw

de_windows.el

changeset 66: 5b737eefe5ea
parent:d0facdd945c7
author: kim.vanwyk
date: Wed Nov 10 15:19:03 2010 +0200 (18 months ago)
permissions: -rw-r--r--
description: Adding CSharp Mode and Google Weather
1(if (equal window-system 'w32)
2(progn
3;;define funct's to allow maximisation on startup
4
5 (defun w32-restore-frame ()
6 "Restore a minimized frame"
7 (interactive)
8 (w32-send-sys-command 61728))
9
10 (defun w32-maximize-frame ()
11 "Maximize the current frame"
12 (interactive)
13 (set-font)
14 (w32-send-sys-command 61488)
15 )
16
17 (add-hook 'window-setup-hook 'w32-maximize-frame t)
18
19 (require-if-exists 'w32-browser)
20 (require-if-exists 'w32-find-dired)
21 (require-if-exists 'w32shell)
22
23 ;;Bind C-xC-g to w32-find-dired
24 (global-set-key "\C-x\C-g" 'w32-find-dired)
25
26 ;; Tramp stuff for windows:
27 (setq tramp-default-method "plink")
28
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")
33
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."
37 (interactive)
38 (shell-command (concat "explorer " (replace-regexp-in-string "/" "\\\\" (file-name-directory (buffer-file-name)) t t))))
39
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)
45 (setenv "PATH"
46 (concat (expand-file-name path-element)
47 path-separator (getenv "PATH")))))
48
49 ))
50
51(provide 'de_windows)