;; Show maching params
(show-paren-mode 1)
(custom-set-variables
;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
'(case-fold-search t)
'(current-language-environment "Latin-1")
'(default-input-method "latin-1-prefix")
'(global-font-lock-mode t nil (font-lock))
'(show-paren-mode t nil (paren)))
(custom-set-faces
;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
)
;; Set titles for frame and icon (%f == file name, %b == buffer name)
(setq-default frame-title-format (list "Emacs: %f"))
(setq-default icon-title-format "Emacs - %b")
(cd "~")
(fset 'yes-or-no-p 'y-or-n-p)
;; Dont show the GNU splash screen
(setq inhibit-startup-message t)
;; ---------------------------------------------------------------------------
;;Key Bindings
;; ---------------------------------------------------------------------------
;; Windows-like selection and key bindings.
(pc-bindings-mode)
(pc-selection-mode)
(delete-selection-mode t)
(setq my-author-name (getenv "Michael Lloyd Lee"))
(setq user-full-name (getenv "Michael Lloyd Lee"))
;(setq default-directory "C:/")
(setq auto-mode-alist
(append
(list
'("\\.jsp" . html-mode))
auto-mode-alist))
;;
;; MMM mode, multimode stuff sdf
;; Java - XML/JSP
;;
(require 'mmm-auto)
(setq mmm-global-mode 'maybe)
(mmm-add-mode-ext-class nil "\\.xml?\\'" 'xml-java)
(mmm-add-mode-ext-class nil "\\.jsp\\'" 'java-html)
(mmm-add-classes
'((xml-java
:submode java-mode
:front ""
:back "")))
(mmm-add-classes
'((java-html
:submode java-mode
:front "<%"
:back "%>")))
; White background for submodes.
(custom-set-faces
'(mmm-default-submode-face ((t (:background "white")))))
;;
;; W3
;;
(setq load-path (cons "C:/emacs/local/w3-4.0pre.47/lisp" load-path))
(require 'w3-auto)
;;
;; css-mode
;;
(autoload 'css-mode "css-mode")
(setq auto-mode-alist
(cons '("\\.css\\'" . css-mode) auto-mode-alist))
;; For use of Bash shell via Cygwin on Windows 2000 (or NT), available from:
;; http://www.cygwin.com/
;; (if you do not have Cygwin installed, comment all of this section out).
;; This assumes that Cygwin is installed in C:\cygwin (the
;; default) and that C:\cygwin\bin is not already in your
;; Windows Path (it generally should not be).
;;
(setq exec-path (cons "C:/cygwin/bin" exec-path))
(setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH")))
;;
;; NT-emacs assumes a Windows command shell, which you change
;; here.
;;
(setq process-coding-system-alist '(("bash" . undecided-unix)))
(setq w32-quote-process-args ?\")
(setq shell-file-name "bash")
(setenv "SHELL" shell-file-name)
(setq explicit-shell-file-name shell-file-name)
;;
;; This removes unsightly ^M characters that would otherwise
;; appear in the output of java applications.
;;
(add-hook 'comint-output-filter-functions
'comint-strip-ctrl-m)
;; End of bash shell use via Cygwin section.
;; The following functions enable on-the-fly switching between
;; the bash shell and DOS:
(defun set-shell-bash()
(interactive)
;; (setq binary-process-input t)
(setq shell-file-name "bash")
(setq shell-command-switch "-c")
(setq explicit-shell-file-name "bash")
(setenv "SHELL" explicit-shell-file-name)
(setq explicit-sh-args '("-login" "-i"))
(setq w32-quote-process-args ?\")
(setq mswindows-quote-process-args t)
)
(defun set-shell-cmdproxy()
(interactive)
(setq shell-file-name "cmdproxy")
(setq explicit-shell-file-name "cmdproxy")
(setenv "SHELL" explicit-shell-file-name)
(setq explicit-sh-args nil)
(setq w32-quote-process-args nil)
)
(global-set-key "\C-xg" 'set-shell-bash)
;; g for Gnu (\C-xb is used for buffer switch command).
(global-set-key "\C-xd" 'set-shell-cmdproxy)
;; End shell-switch on-the-fly.
;; ispell mode
(add-hook 'text-mode-hook 'flyspell-mode)
;; In British thank you.
(ispell-change-dictionary "british" t)
;;* flyspell comments and strings in programming modes
;; From: "Stefan Monnier "
(defun flyspell-generic-progmode-verify ()
"Used for `flyspell-generic-check-word-p' in programming modes."
(let ((f (get-text-property (point) 'face)))
(memq f '(font-lock-comment-face font-lock-string-face))))
(defun flyspell-prog-mode ()
"Turn on `flyspell-mode' for comments and strings."
(interactive)
(setq flyspell-generic-check-word-p 'flyspell-generic-progmode-verify)
(flyspell-mode 1))
(add-hook 'c-mode-common-hook 'flyspell-prog-mode t)
(add-hook 'java-mode-common-hook 'flyspell-prog-mode t)
;;
;; Email stuff
;;
(setq user-full-name "Michael Lloyd Lee")
(setq user-mail-address "mlk@mailandnews.com")
(setq smtpmail-default-smtp-server "mail.mailandnews.com")
(setq smtpmail-local-domain nil)
(setq send-mail-function 'smtpmail-send-it)
(load-library "smtpmail")
(setenv "MAILHOST" "mail.mailandnews.com")
(setq rmail-primary-inbox-list
'("po:mlk@mailandnews.com") rmail-pop-password-required t)
;; gnuserv - uses a single frame.
(load-library "gnuserv")
(gnuserv-start)
(setq gnuserv-frame (selected-frame))
(load-library "htmlize")