 ;;; Gnu Emacs Initialization File -- Steve Savitzky
-
-;;; Which version?
-;;;	It's time to give up on this stuff
-(defconst emacs18 (string-match "^18\\." emacs-version)
-  "non-nil iff Emacs 18, nil otherwise")
-
-;;; Version-dependent filenames for my local hacks.
-(defun hack-file (name)
-  "Generate an appropriate filename, either NAME-hacks or NAME-19"
-  (concat name (if emacs18 "-hacks" "-19")))
-
-(defun load-hacks (name)
-  "Load file NAME-hacks or NAME-19 depending on emacs version"
-  (load (hack-file name) t))
 
 (setq my-home-emacs-dir (concat (getenv "HOME") "/emacs"))
 (if (file-exists-p my-home-emacs-dir)
     (setq load-path (cons my-home-emacs-dir load-path))
   (setq my-home-emacs-dir nil))
-
-
-;;; Set up load paths.
-(if nil (progn
-(if (file-exists-p "/usr/local/starport/site-lisp")
-    (progn (setq load-path (cons "/usr/local/starport/site-lisp" load-path))
-	   (load "/usr/local/starport/site-lisp/default.el" t)
-	   )
-)
-
-;;; put our old site-lisp at the end.  elib/cookie.el is used by pcl-cvs
-(if (file-exists-p "/local/share/emacs/site-lisp")
-    (progn (setq load-path 
-		 (append  load-path 
-			  (list "/local/share/emacs/site-lisp"
-				;"/usr/local/share/emacs/site-lisp/elib"
-				)))
-	   (load "/local/share/emacs/site-lisp/default.el" t)
-	   )
-)))
 
 ;;; Load the things we always need.  
 ;;;	Use load rather than require to prevent errors if files don't exist.

;;; lj-compose to compose; ^C-s to post


(if (file-exists-p "~/.abbrev_defs") (quietly-read-abbrev-file nil))

(cond (my-home-emacs-dir
       (load "ss-browse-hacks" t)
       (autoload 'ss-gnus-hacks (hack-file "ss-gnus") "hacks for gnus" t)
       (autoload 'ss-dired-hacks "ss-dired-hacks" "hacks for dired" t)
       (add-hook 'dired-mode-hook 'ss-dired-hacks)))


(or (fboundp 'gin-mode-on) (defun gin-mode-on () "no gin-mode: fake it"))

;;; Version-dependent loads and other setup
;;; obsoleted


(if (fboundp 'global-font-lock-mode) (global-font-lock-mode t))
(add-hook 'c-mode-hook 'turn-on-font-lock)

;;; Many html-helper-mode commands are useful in other modes
(load "html-helper-mode" t)


(if (file-exists-p "~/.abbrev_defs") (quietly-read-abbrev-file nil))

(cond (my-home-emacs-dir
       ;; ss-browse-hacks, ss-key-hacks haven't been used for years
       (autoload 'ss-gnus-hacks "ss-gnus-hacks" "hacks for gnus" t)
       (autoload 'ss-dired-hacks "ss-dired-hacks" "hacks for dired" t)
       (add-hook 'dired-mode-hook 'ss-dired-hacks)))

(setq ljupdir (concat my-home-emacs-dir "/ljupdate"))
(if (file-exists-p ljupdir)
    (progn (setq load-path (cons ljupdir load-path))
	   (if (fboundp 'html-helper-mode)
	       ;; we use html-helper-mode as a base for lj-update, and
	       ;; don't use html-mode anyway.
	       (defalias 'html-mode 'html-helper-mode))
	   (require 'ljupdate)
	   ;(setq lj-default-profile (lj-defprofile 'livejournal "mdlbear"))
	   )
