;;; Some of the elisp in this file was derived from marc@mit.edu's .emacs
;;; file. Most of the rest was written by nocturne@mit.edu .

(load "/afs/athena.mit.edu/user/n/o/nocturne/home/lib/elisp/myutils.el")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;            Lots of random variable definitions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(put 'eval-expression 'disabled nil)

(defvar default-load-path load-path)

;;; Remember to delete the "scheme" entry after I finish 6.034 ... :-)

(setq
 load-path (append
            (list
             (expand-file-name "~/lib/elisp")
	     "/mit/scheme/elisp"
             "/afs/sipb.mit.edu/contrib/emacs/elisp"
             "/mit/watchmaker/lib/elisp"
             "/afs/sipb.mit.edu/project/sipb/lib/elisp"
             "/mit/consult/elisp"
	     "/mit/sipb/lib/elisp"
             "/mit/outland/lib/elisp")
            default-load-path))
(setq load-path (filter-nils (mapcar 'my-check-file-exists load-path)))

(defvar default-auto-mode-alist auto-mode-alist)
(setq
 auto-mode-alist (append
                  '(
                    ("\\.m$" . c-mode)
                    ("\\.\\(pl\\|ph\\|perl\\)$" . perl-mode)
                    ("\\.\\(C\\|H\\|cc\\|hh\\)$" . c++-mode)
                    ("cat[0-9]/.*\\.1$" . fundamental-mode)
                    ("\\.1$" . nroff-mode)
		    ("\\.gwm$" . lisp-mode)
                    )
                  default-auto-mode-alist))

(setq fill-extra-space-after-period nil)

(setq mail-default-headers "From: Eric Mumpower <nocturne@mit.edu>\n")
(setq rmail-file-name (expand-file-name "/mit/nocturne/home/rmail/inbox"))
(setq rmail-last-file "/mit/nocturne/home/rmail/w")
(setq rmail-last-rmail-file "/mit/nocturne/home/rmail/w")
(setq rmail-delete-after-output t)
; (setq rmail-dont-reply-to-names "info-\\|nocturne\\>")
(setq w3-default-homepage
      "file://localhost/afs/sipb/user/nocturne/www-lib/private/startup.html")

(setq gnus-nntp-server "news.mit.edu")

; Very important definition: doesn't bother you with new newsgroups.
; You can keep your .newsrc* short and neat.
(setq gnus-subscribe-newsgroup-method
      '(lambda (newsgroup) nil))

(setq discuss-DWIM t)
(setq truncate-partial-width-windows nil)
(setq delete-auto-save-files t)
(setq text-mode-hook (function (lambda ()
                                 (abbrev-mode 1)
                                 (setq fill-column 76)
                                 (auto-fill-mode 1))))
(defvar default-completion-ignored-extensions completion-ignored-extensions)
(setq
 completion-ignored-extensions (append
                                '("./" "../")
                                default-completion-ignored-extensions))
(setq find-file-not-found-hooks '(try-attach))
(setq man-program
      (cond ((file-readable-p "/usr/athena/bin/man") "/usr/athena/bin/man")
            ((file-readable-p "/usr/ucb/man") "/usr/ucb/man")
            (t "/bin/false")))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;         These are just lots of autoload statements.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(autoload 'display-current-line-number
                  "/mit/consult/lib/elisp/current-line"
                  "Display the current line number on the status line."
                  t)
(autoload 'browse-mode "browse-mode" "A mode for browsing files" t)
(autoload 'cmd "/afs/athena.mit.edu/user/k/k/kkkken/elisp/cmd"
          "Ken's studly shell mode" t)
(autoload 'staple "/afs/athena.mit.edu/user/e/i/eichin/elisp/staple.el")
(autoload 'sokoban "/mit/games/elisp/sokoban.elc" "sokoban" t)

(autoload 'zwgc "/afs/athena.mit.edu/user/b/j/bjaspan/elisp/zwgc"
          "Emacs mode zwgc" t)
(autoload 'zsend "zsend" "Emacs zephyr send" t)
(autoload 'zsend-region "zsend" "Emacs zephyr send" t)

(autoload 'perl-mode "/afs/athena.mit.edu/contrib/perl/elisp/perl-mode"
          "Major mode for editing Perl code." t)
(autoload 'describe-perl-symbol
          "/afs/athena.mit.edu/contrib/perl/elisp/perl-descr"
          "Describes a perl expression" t)

(autoload 'gnus "gnus" "Read network news." t)
(autoload 'gnus-post-news "gnuspost" "Post a new news." t)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;               Things I actually use all the time.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; This is a hacked-up version of auto-fill that puts only one space
;; after a period when you fill a region. (the emacs18 code uses two)
(load "fill1")

(load (expand-file-name "~/lib/elisp/mutant-scrolling.el"))
