; ; Customizations for all modes: ; (setq line-number-mode 't) (setq column-number-mode 't) (setq default-major-mode 'text-mode) (setq-default fill-column 80) (setq make-backup-files nil) ; XEmacs chokes on the following, and refuses to read further ; How to get Emacs to read it, and XEmacs not? ;(menu-bar-mode nil) ; Fix the problem with C-h. (global-set-key "\C-x?" 'help-command) (global-set-key "\C-h" 'delete-backward-char) ; Assorted key customizations (global-set-key "\C-t" 'scroll-down) ; formerly ESC v (global-set-key "\C-i" 'tab-to-tab-stop) ; Tab key inserts \t (global-set-key "\M-g" 'goto-line) (global-set-key "\M-j" 'backward-word) (global-set-key "\M-k" 'forward-word) ; "Compatibility bindings" for register copy/insert (global-set-key "\C-xg" 'insert-register) (global-set-key "\C-xx" 'copy-to-register) ; ; Tabs: ; ; display tab stops every 4 spaces (setq-default tab-width 4) ; insert tab stops every 4 spaces (setq-default tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120)) ; load-path, for emacs lisp modules (setq load-path (append load-path (list (concat (getenv "HOME") "/usr/all/lib/emacs")) )) ; ; Hook functions, for use in modes that reset the settings above. ; ; Change \C-i to tab-to-tab-stop (defun make-tab-key-tab () (local-set-key "\C-i" 'tab-to-tab-stop) ) ; ; html-helper-mode ; (autoload 'html-helper-mode "html-helper-mode" "HTML helper mode" t) (setq auto-mode-alist (cons '("\\.gtml?$" . html-helper-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.html?$" . html-helper-mode) auto-mode-alist)) ; ; PHP mode ; (require 'php-mode) (add-hook 'php-mode-hook '(lambda () (local-set-key "\C-i" 'c-indent-command) (setq tab-stop-list '(2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80)))) (setq php-mode-warn-if-mumamo-off nil) (require 'drupal-mode) (add-to-list 'auto-mode-alist '("\\.\\(php\\|inc\\|module\\|test\\|install\\|theme\\)$" . drupal-mode)) (add-to-list 'auto-mode-alist '("\\.info" . conf-windows-mode)) ; ; python mode ; (add-hook 'python-mode-hook '(lambda () (local-set-key "\C-i" 'c-indent-command))) ; ; perl mode: Load Perl files in text mode, not Perl (or prolog) ; (setq auto-mode-alist (cons '("\\.(cgi|pl|pm)$" . perl-mode) auto-mode-alist)) ; ; shell script mode: override tab indentation ; (add-hook 'sh-mode-hook 'make-tab-key-tab) ; ; text mode ; (add-hook 'text-mode-hook 'make-tab-key-tab) (custom-set-variables '(load-home-init-file t t) '(gnuserv-program (concat exec-directory "/gnuserv"))) ;(custom-set-faces) (put 'downcase-region 'disabled nil)