;; ;; BEA Systems, emacs preferences ;; ;; Meta- sets the mark. (global-set-key "\M- " 'set-mark-command) ;; Goto (global-set-key "\M-g" 'goto-line) ;; F keys (define-key global-map [f1] 'delete-other-windows) (define-key global-map [f2] 'split-window-vertically) (define-key global-map [f3] "o") (define-key global-map [f4] 'shrink-window) (define-key global-map [f5] 'enlarge-window) (define-key global-map [f6] 'indent-region) (define-key global-map [f7] 'indent-for-comment) (define-key global-map [f8] 'comment-region) ;; Use for uncommenting a region (define-key global-map [f9] 'goto-line) (define-key global-map [f10] 'toggle-read-only) (define-key global-map [f12] 'remove-control-m) (define-key global-map [mouse-3] 'mouse-buffer-menu) ;; Popup buffers menu when right mouse button is pressed ;;(global-set-key [button-3] 'popup-buffer-menu) ;; For XEmacs the mapping is slightly different ;; Use spaces for tabs (setq-default indent-tabs-mode nil) ;; Make java-mode the default mode for new buffers (setq default-major-mode 'java-mode) ;; Load JDE (setq load-path (nconc '( "d:/opt/jde-2.1.6beta23/lisp" "d:/opt/cc-mode-5.26" ) load-path)) (require 'jde) ;; Add current time in the status bar (display-time) ;; Control indentation style (require 'cc-mode) (c-set-offset 'substatement-open 0) ;; Filename patterns vs. corresponding major mode functions (setq auto-mode-alist (append '(("\\.xml$" . xml-mode) ) auto-mode-alist)) ;; Macro That Removes (Defalias 'Remove-Control-M (Read-Kbd-Macro "Esc < Esc X Replace- String Ret C-Q C-M 2*Ret Esc <")) ;; Printer configuration using Enscript (Ascii to PS converter) ;; ;; Printing is done using the Tools->Print->Print Buffer menu item. ;; (setq lpr-command "d:\\opt\\enscript\\enscript.exe") (setq lpr-switches (list "--font=Courier7" "--header-font=Courier7" "--line-numbers" "--pretty-print=java" (format "--header=%s" (buffer-name)))) (setq printer-name t) ;; ;; The following lines are commented out because I could not ;; find the options to specify in the lpr-switches to enable ;; the duplex printing. ;; ;;(setq printer-name "//[server]/[printer]") ;;(setq ps-header-offset 1) ;;(setq ps-header-title-font-size 7) ;;(setq ps-header-font-size 7) ;;(setq ps-header-lines 1) ;;(setq ps-line-number t) ;;(setq ps-spool-duplex t) ;;(setq ps-font-family 'Courier) ;;(setq ps-font-size 7) ;; Color preferences (custom-set-faces '(text-cursor ((t (:foreground "white" :background "red3"))) t) '(font-lock-string-face ((((class color) (background light)) (:foreground "green4" :italic t)))) '(font-lock-reference-face ((((class color) (background light)) (:foreground "black")))) '(font-lock-doc-string-face ((((class color) (background light)) (:foreground "green4" :bold t)))) '(font-lock-variable-name-face ((((class color) (background light)) (:foreground "black")))) '(font-lock-keyword-face ((((class color) (background light)) (:foreground "black" :bold t)))) '(font-lock-type-face ((((class color) (background light)) (:foreground "black")))) '(font-lock-comment-face ((((class color) (background light)) (:foreground "red4" :italic t)))) '(font-lock-function-name-face ((((class color) (background light)) (:foreground "black")))))