1 (if (string-match "cygwin"
2 (downcase (shell-command-to-string "uname")))
4 (setq exec-path (cons "C:/Cygwin/bin" exec-path))
5 (setenv "PATH" (concat "C:/Cygwin/bin;" (getenv "PATH")))))
7 (setenv "CVS_RSH" "ssh")
9 ;; NT-emacs assumes a Windows command shell, which you change here.
10 (setq process-coding-system-alist '(("bash" . undecided-unix)))
11 (setq w32-quote-process-args ?\")
12 (setq shell-file-name "bash")
13 (setenv "SHELL" shell-file-name)
14 (setq explicit-shell-file-name shell-file-name)
16 ;; This removes unsightly ^M characters that would otherwise
17 (add-hook 'comint-output-filter-functions
19 (setq shell-command-switch "-cf")
21 (global-set-key "\C-x\C-c" 'kill-buffer)
22 (global-set-key "\C-x\C-n" 'save-buffers-kill-emacs)
23 (global-set-key "\C-x\C-z" 'suspend-emacs-or-iconify-frame)
25 (setq-default column-number-mode t)
27 (setq-default line-number-mode t)
29 (global-set-key 'kp-tab 'tab-to-tab-stop)
30 (set-default 'indent-tabs-mode t)
31 (set-default 'tab-width 8)
32 (c-set-offset 'substatement-open 0)
33 (c-set-offset 'case-label '+)
35 ; Preload common modes
36 (load-file "/usr/share/xemacs/xemacs-packages/lisp/sh-script/sh-script.el")
37 (load-file "~/.xemacs/clearcase.el")
38 (load-file "~/.xemacs/visual-basic-mode.el")
39 (autoload 'sh-mode "sh-mode")
40 (autoload 'perl-mode "perl-mode")
41 (autoload 'javascript-mode "javascript-mode")
42 (autoload 'visual-basic-mode "visual-basic-mode")
45 '((c-auto-newline . nil)
46 (c-toggle-auto-state . 1)
48 (c-block-comments-indent-p . t)
49 (c-comment-only-line-offset . nil)
50 (c-echo-syntactic-information-p . nil)
51 (c-hanging-comment-ender-p . t)
52 (c-recognize-knr-p . t) ; use nil if only have ANSI prototype
53 (c-tab-always-indent . t)
56 (comment-multi-line . t)
57 (comment-start . "/* ")
58 (c-hanging-comment-ender-p . nil)
59 (c-offsets-alist . ((knr-argdecl-intro . +)
63 (statement-case-open . +)
65 (substatement-open . 0))))
66 "my c-style for cc-mode")
68 (add-hook 'c-mode-common-hook
70 (c-add-style "MINE" my-c-style)
71 (c-set-style "MINE")))
75 (recent-files-initialize)
77 ;; Set ftp program to use Windows FTP. Using Cygwin's ftp is problematic for a Windows
79 ;(setq efs-ftp-program-name "C:/Windows/System32/Ftp")
81 ;; Set shell-file-name and shell-command-switch for Tramp
82 ;(setq shell-file-name "cmd.exe")
83 ;(setq shell-command-switch "/e:4096 /c")
85 ;; Set default tramp-default-method to ssh as well as
86 ;; insert ":" into shell-prompt-pattern
87 (setq tramp-default-method "ssh")
88 (setq shell-prompt-pattern "^[^#$%>:\n]*[#$%>:] *")
91 (set-variable 'smtpmail-smtp-server '"defaria.com")
93 ;;default font and face properties.
95 (set-face-foreground 'default "black")
96 ;; (set-face-background 'default "#e4deb4")
97 (set-face-background 'default "white")
98 (set-face-font 'default "Lucida Console:Regular:10"))
100 ;; Startup a certain size
101 (set-frame-height (selected-frame) 50)
102 (set-frame-width (selected-frame) 90)
105 ;;(set-face-background-pixmap 'default
106 ;; (expand-file-name "P:/Documents/pad.jpg")
107 ;; (get-buffer "*info*"))
112 ;; Fix problem with Clearcase.el
115 ;; Change comment-column to 0 for perl. comment-column is used for one
116 ;; of the two types of comment lines that the perl mode supports -
117 ;; full line comments and inline comments. The comment-column is used
118 ;; for the inline comments, which I rarely use. Setting it to 0 means
119 ;; don't try to align things. So I'll just align them myself.
120 (defun perl-zero-comment-column ()
121 (setq comment-column 0)) (add-hook 'cperl-mode-hook 'perl-zero-comment-column)
123 (global-set-key "\C-z" 'undo)
124 (mouse-avoidance-mode 'cat-and-mouse)