(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. '(case-fold-search t) '(column-number-mode t) '(current-language-environment "UTF-8") '(default-input-method "rfc1345") '(font-lock-mode t t (font-lock)) '(fringe-mode 0 nil (fringe)) '(global-font-lock-mode t nil (font-lock)) '(grep-command "find . -not -path \"*.svn*\" -type f -print0 | xargs -0 -e grep -niH ") '(menu-bar-mode t nil (menu-bar)) '(query-user-mail-address nil) '(save-place t nil (saveplace)) '(show-paren-mode t nil (paren)) '(size-indication-mode t) '(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify))) '(tool-bar-mode nil nil (tool-bar)) '(transient-mark-mode t) '(uniquify-buffer-name-style (quote forward) nil (uniquify)) '(user-mail-address "martyn@imendio.com")) ;; Settings (setq query-replace-highlight t) (setq search-highlight t) (setq compilation-scroll-output t) ;(setq compilation-window-height 8) (setq kill-whole-line t) (setq ring-bell-function '(lambda ())) (setq inhibit-startup-message t) (setq default-major-mode 'text-mode) ;; Set column fill width when using M-q to reformat comments (setq fill-column 77) (setq sentence-end-double-space nil) ;; Set scroll bar to the right (set-scroll-bar-mode 'right) ;; Default to better frame titles (setq system-name "nemesis") (setq frame-title-format (concat "%b - emacs on " system-name)) ;; Set up modes (defun match-c-indent-style () (make-local-variable 'c-indentation-style) (let ((curdir (expand-file-name ""))) (c-set-style (cond ((string-match "/gtk+" curdir) "gnu") ((string-match "/glib" curdir) "gnu") ((string-match "/pango" curdir) "gnu") (t "linux"))))) (autoload 'egtk-mode "egtk" "mode for editing GTK+ code") (add-hook 'c-mode-hook 'match-c-indent-style) (add-hook 'c-mode-hook 'egtk-mode) (add-hook 'c-mode-hook 'turn-on-font-lock) (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock) (setq c-mode-common-hook '(lambda () (setq indent-tabs-mode nil) (setq show-trailing-whitespace "true"))) ;; Disable PO mode when editing .po files. (setq auto-mode-alist (cons '("\\.po[tx]?\\'\\|\\.po\\." . text-mode) auto-mode-alist)) ;; Use mouse wheel (cond (window-system (mwheel-install) )) ;; Devhelp (defun devhelp-word-at-point () "runs devhelp" (interactive) (setq w (current-word)) (start-process-shell-command "devhelp" nil "devhelp" "-s" w) ) ;; Python setup (defun my-python-mode-hook () (setq-default indent-tabs-mode nil) (setq py-indent-offset 4) ) (add-hook 'python-mode-hook 'my-python-mode-hook) ;; Recent files (require 'recentf) (recentf-mode 1) ;; Show path info in otherwise identical filenames (require 'uniquify) (setq uniquify-buffer-name-style 'post-forward) ;; Set up the keyboard so the delete key on both the regular keyboard ;; and the keypad delete the character under the cursor and to the right ;; under X, instead of the default, backspace behavior. (global-set-key [delete] 'delete-char) (global-set-key [kp-delete] 'delete-char) (global-set-key "\C-x\C-e" 'compile) (global-set-key "\C-x\C-n" 'next-error) (global-set-key "\C-x\C-p" 'previous-error) (global-set-key "\M-g" 'goto-line) (global-set-key "\M-h" 'devhelp-word-at-point) (global-set-key "\M--" 'ff-get-other-file) ;; Set up completion for functions (setq dabbrev-case-fold-search nil) (setq dabbrev-case-replace nil) (global-set-key [C-tab] 'dabbrev-expand) ;; Load other main config files (load-file "~/.emacs.d/egtk.el") (load-file "/usr/share/doc/git-core/contrib/emacs/git.el") (load-file "~/.emacs.d/svn.el") (load-file "~/.emacs.d/gtk-doc.el") (load-file "~/.emacs.d/color-theme.el") ;; Read from color theme file (require 'color-theme) (if window-system (color-theme-deep-blue) (color-theme-emacs-21)) (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. '(default ((t (:stipple nil :background "#102e4e" :foreground "#eeeeee" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 90 :width normal :family "unknown-dejavu sans mono")))))