(custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(TeX-output-view-style (quote (("^pdf$" "." "open -a Skim.app %o")))) '(gud-gdb-command-name "gdb --annotate=1") '(large-file-warning-threshold nil) '(safe-local-variable-values (quote ((TeX-master . "paper") (TeX-master . "nrmletter"))))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) ;; emacsclient ;;(server-start) ;; Auto-save more frequently than the default (setq auto-save-interval 100) ;; Turn on font-lock in all modes that support it (global-font-lock-mode t) (setq font-lock-maximum-decoration t) ;; Highlight regions and add special behaviors to regions. ;; "C-h d transient" for more info (setq transient-mark-mode t) ;; "y or n" instead of "yes or no" (fset 'yes-or-no-p 'y-or-n-p) ;; Display line and column numbers (setq line-number-mode t) (setq column-number-mode t) ;; Display parent brackets (setq show-paren-mode t) ;; Remove unnecessary gui stuff (if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) (if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) (if (fboundp 'menu-bar-mode) (menu-bar-mode 1)) ;;(tool-bar-mode nil) ;;(menu-bar-mode nil) ;;(scroll-bar-mode nil) ;; cursor (blink-cursor-mode nil) (blink-cursor-mode 0) ;; no blink ;; visual-bell (setq visible-bell t) ;; colors (set-cursor-color "red") (set-mouse-color "green") ;; global soft wrap ;; Ensure "auto-word-wrap-default-function" is set to "turn-on-word-wrap". This is the new default. (set-default 'word-wrap t) ;;(set-background-color "black") ;;(set-face-background 'default "black") ;;(set-face-background 'region "black") ;;(set-face-background 'region "orange") ;;(set-face-foreground 'default "white") ;;(set-face-foreground 'region "gray60") ;;(set-foreground-color "white") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; folding ;;; ;; This is how you set up your own folding shortcuts. ;; I would prefer to use the defaults for mouse buttons, ;; but my Mac has only one. ;; "\C-cf" means "control-c f" and so forth. ;;(defun my-folding-bind-keys () ;; "My favourite folding keys" ;; (define-key folding-mode-map "\C-cf" ;; 'folding-toggle-show-hide) ;; (define-key folding-mode-map "\C-co" ;; 'folding-open-buffer) ;; (define-key folding-mode-map "\C-cc" ;; 'folding-whole-buffer) ;; ) ;;(defun my-folding-bind-mouse () ;; "My favourite folding mouse keys" ;; (define-key folding-mode-map [mouse-1] ;; 'folding-mouse-context-sensitive) ;; ) ;;(setq folding-default-keys-function 'my-folding-bind-keys) ;;(setq folding-default-mouse-keys-function 'my-folding-bind-mouse) ;; Now load folding.el. Put in your own path ;; or get your sysadmin to install folding.el. ;;(load "~/bin/folding.el") ;; (load "folding" 'nomessage 'noerror) ;;(folding-mode-add-find-file-hook) ;; This is how you add new folding marks to the master list. ;; Look at folding.el for the default marks list. ;;(folding-add-to-marks-list 'Prolog-mode "%{{{ " "%}}}" nil) ;;(folding-add-to-marks-list 'prolog-mode "%{{{ " "%}}}" nil) ;;(folding-add-to-marks-list 'sql-mode "-- {{{ " "-- }}}" nil t) ;; alternative folding mode (defvar fold-mode-prefix-key "\C-c") (load "~/bin/fold.el") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; yasnippet ;;; (add-to-list 'load-path "~/.emacs.d/plugins/yasnippet") (require 'yasnippet) (yas/initialize) (yas/load-directory "~/.emacs.d/plugins/yasnippet/snippets") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ctags ;;; ;;; http://ctags.sourceforge.net/ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; scala ;;; (add-to-list 'load-path "~/vc/svn/lampsvn.epfl.ch/scala-mode") (require 'scala-mode-auto) ;; http://scala.sygneca.com/tools/emacs (defun scala-turnoff-indent-tabs-mode () (setq indent-tabs-mode nil)) (add-hook 'scala-mode-hook 'scala-turnoff-indent-tabs-mode) (defun scala-turnoff-truncate-lines-mode () (setq truncate-lines 1)) (add-hook 'scala-mode-hook 'scala-turnoff-truncate-lines-mode) ;; yasnippet (add-hook 'scala-mode-hook '(lambda () (yas/minor-mode-on))) (setq yas/my-directory "~/vc/svn/lampsvn.epfl.ch/scala-mode/contrib/yasnippet/snippets") (yas/load-directory yas/my-directory) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ocaml ;;; (add-to-list 'load-path "~/lib/tuareg-mode") (setq auto-mode-alist (cons '("\\.ml\\w?" . tuareg-mode) auto-mode-alist)) (autoload 'tuareg-mode "tuareg" "Major mode for editing Caml code" t) (autoload 'camldebug "camldebug" "Run the Caml debugger" t) ;; custom-tuareg.el - Tuareg customization example: Append this file to .emacs. ;; Here is an example of Tuareg variables customization: (add-hook 'tuareg-mode-hook '(lambda () (setq tuareg-lazy-= t) ; indent `=' like a standard keyword (setq tuareg-lazy-paren t) ; indent [({ like standard keywords (setq tuareg-in-indent 0) ; no indentation after `in' keywords (auto-fill-mode 1) ; turn on auto-fill minor mode (if (featurep 'sym-lock) ; Sym-Lock customization only (setq sym-lock-mouse-face-enabled nil)) ; turn off special face under mouse )) ;; If you use Sym-Lock, you could also add some customization code after the ;; `(require 'sym-lock)' in your `.emacs' (if (featurep 'sym-lock) (setq tuareg-sym-lock-keywords '(("<-" 0 1 172 nil) ("->" 0 1 174 nil) ;; (":=" 0 1 220 nil) ("<=" 0 1 163 nil) (">=" 0 1 179 nil) ("<>" 0 1 185 nil) ("==" 0 1 186 nil) ("||" 0 1 218 nil) ("&&" 0 1 217 nil) ("[^*]\\(\\*\\ nil)\\." 1 8 180 nil) ("\\(/\\ nil)\\." 1 3 184 nil) ;; (":>" 0 1 202 nil) ;; (";;" 0 1 191 nil) ("\\<_\\>" 0 3 188 nil) ("\\" 0 3 214 nil) ("\\" 0 3 198 nil) ("\\" 0 3 108 nil) ("\\" 0 3 218 nil) ("\\" 0 3 216 nil)))) ;;;;;;;;;;;;;;;;;;;;;NXML-Mode;;;;;;;;;;;;;;;; ;;(load "rng-auto.el") ;;(setq nxml-slash-auto-complete-flag t) ;;(add-to-list 'auto-mode-alist '("\.\(xml\|svg\|wsdl\|xslt\|wsdd\|xsl\|rng\|xhtml\)\'" . nxml-mode) nil) (unify-8859-on-decoding-mode) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; TeX ;;; ;(load "tex-site") ; ;;(add-hook 'TeX-mode-hook 'turn-on-auto-fill) ;;(setq-default fill-column 160) ;;(add-hook 'TeX-mode-hook 'longlines-mode) (add-hook 'TeX-mode-hook 'turn-on-word-wrap) (setq-default TeX-auto-save nil) (setq TeX-parse-self t) (setq TeX-auto-save t) ; Enable parse on save. (setq-default TeX-auto-regexp-list 'LaTeX-auto-regexp-list) (setq-default TeX-auto-parse-length 999999) ;(add-hook 'text-mode-hook 'turn-on-auto-fill) ;(setq c-auto-newline t) ;(setq default-major-mode 'indented-text-mode) ;(setq-default fill-column 90) ;(setq-default TeX-master nil) ;(load-library "bib-cite") ;(add-hook 'LaTeX-mode-hook ; '(lambda () ; (defun TeX-Inserting (sta stb stc) ; (if (= (preceding-char) sta ) ; (insert stb) ; (progn (insert stc) (backward-char 1)))) ; (local-set-key "{" 'TeX-schweif) ; (local-set-key "(" 'TeX-rundekl) ; (local-set-key "[" 'TeX-eckigek) ; (local-set-key "$" 'TeX-dollarm) ; (defun TeX-schweif () (interactive) (TeX-Inserting ?\\ "{" "{}")) ; (defun TeX-rundekl () (interactive) (TeX-Inserting ?\\ "(" "()")) ; (defun TeX-eckigek () (interactive) (TeX-Inserting ?\\ "[" "[]")) ; (defun TeX-exponen () (interactive) (TeX-Inserting ?\\ "^" "^{}")) ; (defun TeX-subscri () (interactive) (TeX-Inserting ?\\ "_" "_{}")) ; (defun TeX-dollarm () (interactive) (TeX-Inserting ?\\ "$" "$$")))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; old stuff ;;; ;; fonts ;;(defconst default-fonts ;; ;; by ROB each of these next two font sizes changed to 14 from 12 ;; '("-monotype-andale mono-*-*-*-*-14-*-75-75-*-*-iso10646-*" ;; "-monotype-andale mono-*-*-*-*-14-*-75-75-*-*-iso8859-*" ;; ;; /by ROB ;; "-monotype-monotype.com-*-*-*-*-11-*-75-75-*-*-iso8859-*" ;; "-*-proggy square-*-*-*-*-11-*-*-*-*-*-iso8859-1" ;; "-lfp-gamow-*-r-*-*-7-*-*-*-*-*-iso8859-1" ;; "-dec-terminal-medium-*-*-*-14-*-75-75-*-*-iso8859-1" ;; )) ;; ;; ;;(setq case-fold-search t) ;;(setq scroll-step 1) ;;(setq scroll-conservatively 5) ;;(if (functionp 'global-hi-lock-mode) ;; (global-hi-lock-mode 1) ;; (hi-lock-mode 1)) ;; ;;;; Set default frame size ;;(let ((frame `((width . 110) (height . 45) (top . 30) (left . 500)))) ;; (setq default-frame-alist frame) ;; (setq initial-frame-alist frame)) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; prolog ;;; ;(autoload 'run-prolog "prolog" "Start a Prolog sub-process." t) ;(autoload 'prolog-mode "prolog" "Major mode for editing Prolog programs." t) ;(setq prolog-program-name "swipl") ;(setq prolog-system 'swi) ;(add-to-list 'auto-mode-alist '("\\pl$" . prolog-mode))