;; My ~/.emacs config file
;; comfortable code
(global-font-lock-mode t)
(setq transient-mark-mode t)
(show-paren-mode t)
(column-number-mode t)
;; allow using a wheel-mouse
(mouse-wheel-mode t)
;; M-g does something useless by default
(global-set-key "\M-g" 'goto-line)
;; reverse of \C-c\C-c (comment out region)
(global-set-key "\C-cu" 'uncomment-region)
;; easy acces to cursor position saving into registers
(global-set-key "\C-xp" 'point-to-register)
(global-set-key "\C-xj" 'jump-to-register)
;; enable upcase-region command C-x c-u
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)
;; silent bell
(setq visible-bell t)
;; enable use of the emacsclient command
(server-start)
;; ocaml mode
(setq load-path (cons "tuareg" load-path))
(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)
;; got from: http://www.cgd.ucar.edu/cms/processor/archive/samples/\
;; unsupported/processor-tools.el
(defun kill-trailing-whitespace ()
"Eliminate trailing whitespace"
(interactive)
(save-excursion
(goto-char (point-min))
(while (re-search-forward "[ \t]+$" nil t)
(delete-region (match-beginning 0) (point)))))
Labels:
.emacs,
dot emacs configuration file