~ ghurley /.emacs

;; Red Hat Linux default .emacs initialization file

;; Are we running XEmacs or Emacs?
(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))

;; 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)

;; Turn on font-lock mode for Emacs
(cond ((not running-xemacs)
       (global-font-lock-mode t)
))

;; Visual feedback on selections
(setq-default transient-mark-mode t)

;; Always end a file with a newline
(setq require-final-newline t)

;; Stop at the end of the file, not just add lines
(setq next-line-add-newlines nil)

;; Enable wheelmouse support by default
(cond (window-system
       (mwheel-install)
))

;;  my additions
(keyboard-translate ?\C-h ?\C-?)
(column-number-mode 1)
(set 'backup-by-copying-when-mismatch 1)
 
(setq c-basic-indent 4)
(setq tab-width 4)
(setq-default indent-tabs-mode nil)
    
;;  php settings from http://www.phpfreaks.com/pear_manual/page/standards.html
(defun php-indent-settings ()
  (setq tab-width 4
        c-basic-offset 4
        c-hanging-comment-ender-p nil
                indent-tabs-mode nil
;;                (not
;;                  (and (string-match "/\\(PEAR\\|pear\\)/" (buffer-file-name))
;;                                 (string-match "\.php$" (buffer-file-name)))
))
(add-hook 'php-mode-hook 'php-indent-settings)

;; set it so that emacs will automatically hard-wrap long lines.
(setq default-major-mode 'text-mode)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(setq read-abbrev-file)
(menu-bar-mode nil)
(setq delete-auto-save-files t)

;(add-to-list 'load-path "/usr/local/slime-2.0")  ; your SLIME directory
;(setq inferior-lisp-program "/usr/local/bin/sbcl") ; your Lisp system
;(require 'slime)
;(slime-setup)