;;; emacs-21.* configuration [bert]

;;; TO DO:
; highlighting stuff for discuss, eolcr
; adaptive-fill-mode

;;;;; Settings and preferences

;;; List of things that should be loaded when compiling

(defun require-everything-referenced-in-emacs-el ()
  "Loads in everything referenced in my emacs.el file.  This is nice for
compilation, but running it also makes M-TAB (`lisp-complete-symbol') much
more useful when editing that file, since it will complete even for things
in packages that haven't been called (and therefore autoloaded) today. =)"
  (interactive)
  (require 'discuss)
  (require 'outline)
  (require 'vc)
  (require 'ediff)
  (require 'time-stamp)
  (require 'cc-mode)
  (require 'font-lock)
  (require 'etags)			
  (require 'gnus)
  (require 'message)
  (require 'custom)
  (require 'browse-url)
  (require 'view)
  (require 'info))

;;; extend load-path and Info-default-directory-list

(setq load-path
        (append '(;: Things which must be at the start of the load path
		  ;: ...this one was *way* outdated...
		  ;"/afs/sipb/contrib/emacs/packages/red-gnus/lisp"
		  )
		load-path
		'("/afs/athena/contrib/sipb/lib/elisp"
		  "/afs/sipb/contrib/emacs/elisp"
		  "/afs/athena/contrib/consult/lib/elisp"
		  "/afs/athena/astaff/project/infoagentsdev/lib/elisp/w3"
		  "/afs/athena/astaff/project/infoagentsdev/lib/elisp"
		  "/afs/sipb/project/outland/lib/elisp"
		  )) )

(eval-when-compile (require-everything-referenced-in-emacs-el))

(defvar default-Info-default-directory-list Info-default-directory-list
  "Stores the system default value for Info-default-directory-list, so
I can tweak my dotfiles more easily.")

(setq Info-default-directory-list
      (append '("~/elisp/info/"
		;"/afs/sipb/contrib/emacs/packages/red-gnus/texi/"
		)
	      default-Info-default-directory-list
	      '("/afs/athena/astaff/project/emacs19/elisp-info/"
		"/afs/athena/astaff/project/emacs19/info/"
		"/afs/athena/project/gnu/info/"))
      Info-directory-list Info-default-directory-list)

;;; autoloads (except for OLCR stuff)

(autoload 'perl-mode "/afs/athena/contrib/perl/elisp/perl-mode"
	  "Major mode for editing Perl code." 't)
(autoload 'cperl-mode "/afs/athena/contrib/perl5/elisp/cperl-mode"
	  "Another 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 'zwgc "/afs/athena/user/b/j/bjaspan/elisp/zwgc"
          "Emacs ZWGC" 't)
(autoload 'zsend "/afs/athena/user/m/a/marc/elisp/zsend"
          "Zephyr sender" 't)

(autoload 'cmd "/afs/athena.mit.edu/user/k/k/kkkken/elisp/cmd"
          "Ken's studly shell mode" 't)

(autoload 'w3 "w3"
          "an Emacs browser for World Wide Web" 't)
(autoload 'w3-fetch "w3"
          "Retrieve a document over the World Wide Web." 't)
(autoload 'html-mode "html-mode"
	  "Major mode for editing HTML code." 't)
(autoload 'java-mode "/afs/sipb/project/java/elisp/java-mode"
	  "Major mode for editing Java code." 't)

(autoload 'discuss-qa-reply "discuss-qa-reply"
          "MH reply to discuss transaction" 't)

(autoload 'staple-user "/afs/athena/user/e/i/eichin/elisp/staple.el"
          "staple them damn users" 't)

;(autoload 'sh-mode "sh-mode"
;          "Major mode for editing sh scripts." 't)
(autoload 'matlab-mode "/afs/athena/software/matlab/misc/matlab-mode.el"
          "Major mode for editing Matlab code." 't)

(autoload 'run-scheme "xscheme"
          "Run an inferior Scheme process." t)

(autoload 'time-stamp-string "time-stamp" "Generate a timestamp string.")

(autoload 'view-mode-enter "view" "Pop up a buffer in View mode.")
	   
;;; mode selection

(defvar default-auto-mode-alist auto-mode-alist
  "System default value for auto-mode-alist")
(setq auto-mode-alist '(("\\.c\\'" .      c-mode)
                        ("\\.h\\'" .      c-mode)
                        ("\\.h\\.in\\'" . c-mode) ; Autoconf header templates
                        ("\\.y\\'" .      c-mode) ; Yacc files
                        ("\\.lex\\'" .    c-mode) ; Lex files
                        ("\\.cc\\'" .     c++-mode)
                        ("\\.hh\\'" .     c++-mode)
                        ("\\.tex\\'" .    tex-mode) ; (==latex-mode if LaTeX)
                        ("\\.sty\\'" .    latex-mode) ; LaTeX 2.09 style files
                        ("\\.cls\\'" .    latex-mode) ; LaTeX 2e class files
                        ("\\.ltx\\'" .    latex-mode) ; silly people use this
                        ("\\.bbl\\'" .    latex-mode) ; BibTeX definitions
                        ("\\.bib\\'" .    bibtex-mode) ; BibTeX source files
                        ("\\.texi\\'" .   texinfo-mode)
                        ("\\.el\\'" .     emacs-lisp-mode)
                        ("\\.pl\\'" .     cperl-mode)
                        ("\\.PL\\'" .     cperl-mode) ; e.g. Makefile.PL
                        ("\\.pm\\'" .     cperl-mode) ; Perl 5 modules
                        ("\\.px\\'" .     cperl-mode) ; why did I add this???
                        ("\\.perl\\'" .   cperl-mode) ; silly people use this
                        ("\\.xs\\'" .     c-mode) ; Perl 5 interface sources
                        ("\\.tcl\\'" .    tcl-mode)
                        ("\\.java\\'" .   java-mode)
                        ;  ("\\.html\\'" .   html-mode)
                        ("\\.sgml\\'" .   sgml-mode)
                        ("\\.dtd\\'" .    sgml-mode)
                        ("\\.f\\'" .      fortran-mode)
                        ("\\.pas\\'" .    pascal-mode)
                        ("\\.s\\'" .      asm-mode)
                        ;  ("\\.sh\\'" .     sh-mode)
                        ;  ("\\.add\\'" .    sh-mode) ; mkserv add scripts
                        ;  ("\\.del\\'" .    sh-mode) ; mkserv del scripts
                        ("[Mm]akefile" .  makefile-mode) ; NB: "*[Mm]akefile*"!
                        ("\\.make\\'" .   makefile-mode)
                        ("\\`Imake" .     makefile-mode)
                        ("\\.tmpl\\'" .   makefile-mode) ; common Imake fname
                        ("\\.man\\'" .    nroff-mode)
                        ("\\.[0-9]\\'" .  nroff-mode) ; man pages; # == section
                        ("ChangeLog" .    change-log-mode)
                        ("\\.tar\\'" .    tar-mode)
                        ("\\.m\\'" .      matlab-mode)
                        ("\\.hr\\'" .     quail-latin2-mode))) ; MULE: Croatian

(defvar default-interpreter-mode-alist interpreter-mode-alist
  "System default value for interpreter-mode-alist")
(setq interpreter-mode-alist
      (cons '("p" . cperl-mode)
	    (mapcar '(lambda (x) (if (eq (cdr x) 'perl-mode)
				     (cons (car x) 'cperl-mode)
				   (cons (car x) (cdr x))))
		    default-interpreter-mode-alist)))

;;; random useful parameter settings

(put 'eval-expression 'disabled nil) ; no stupid questions about M-:

(auto-fill-mode -1)		; I dislike auto-fill in most circumstances.

(if window-system nil
  ;: Settings for tty sessions
  (menu-bar-mode -1)		; 19.30 has menubar on tty.  Ewwww.
  (setq browse-url-browser-function 'browse-url-w3))

;;; variables that control things

(set-scroll-bar-mode 'right)

(setq ;: generic operational Emacs settings
      completion-ignored-extensions
         '(".o" "~" ".bak" ".ckp" ".err" ".log" ".aux" ".dvi" ".Z" ".F" ".gz")
      shell-file-name "/bin/sh"
      auto-save-list-file-prefix (format "/tmp/.S%d-" (user-uid))

      ;: printing settings for Athena
      lpr-command "enscript"      ; use enscript for all printing
      lpr-switches '("-h")        ; when in doubt, suppress burst page
      lpr-headers-switches "-2rG" ; OK, not just headers, but close
      lpr-add-switches nil        ; we'd like -J but absolutely can't have -T

      ;: variables that control how Emacs looks etc.
      frame-title-format
        '(multiple-frames ("" "%b @ " system-name)
			  ("" "Emacs-" emacs-version " @ " system-name))

      ;: mail settings (some pretty emphatically unused...)
      ;mail-interactive		't
      mail-host-address		"mit.edu"
      mail-user-agent		'message-user-agent
      mh-recursive-folders	't
      mh-progs			"/usr/athena/bin"
      mh-lib			"/usr/athena/etc"
      gnus-startup-file		"~/Mail/.newsrc"
      gnus-init-file		(format "~/elisp/%s/gnus-setup"
					emacs-major-version)
      message-send-mail-function 'message-send-mail-with-mh
      message-autosave-directory "~/Mail"
      rmail-file-name		"~/Mail/RMAIL"

      ;: version control (RCS) settings
      vc-make-backup-files 't
      vc-path   '("/mit/gnu/gbin" "/mit/gnu/bin")
      vc-initial-comment    't
      vc-command-messages   't

      ;: Scheme stuff
      scheme-program-name	"/var/local/scheme/bin/scheme"
      scheme-band-name		"nscmutils.com"
      scheme-program-arguments	"-large"

      ;: w3 and browse-url settings
      w3-default-homepage
         "file://localhost/afs/sipb/user/bert/www/home_page.html"
      browse-url-save-file  't
      browse-url-netscape-program     "netscape-gold"
      browse-url-netscape-arguments   '("-install")

      ;: try to make ediff less annoying
      ediff-window-setup-function 'ediff-setup-windows-plain
      ediff-grab-mouse      nil
      ediff-mouse-pixel-threshhold -1

      ;: settings for other random packages
      custom-file "/dev/null"	; as far as I can tell, custom is useless.
      sh-indent-level 4
      sh-shell-file "/bin/sh"
      cmd-working-directory-regexp "[^/~]*\\([^ \\[\\]:%]+\\)"

      ;: things that may want to get nuked from orbit one of these days
      rmail-summary-mode-hook nil)

;; C settings.  (can't just go into the setq because of `c-set-offset's)

(setq c-basic-offset 4
      c-hanging-comment-ender-p nil)
;      c-font-lock-extra-types (append
;			       '("real" "complex"
;			 "FFT_Context_Data" "xy_function" "prop_generate")
;			       c-font-lock-extra-types)
(if (fboundp 'c-set-offset)
    (progn
      (if (> emacs-minor-version 25)
	  (c-set-offset 'arglist-intro 'c-lineup-arglist-intro-after-paren 't))
      (c-set-offset 'statement-cont 3 't))
  (setq c-continued-statement-offset 3))

;(add-hook 'c-mode-common-hook '(lambda nil

;;; set random hooks

(add-hook 'ediff-cleanup-hook 'ediff-janitor)
(add-hook 'outline-mode-hook  '(lambda () (hide-sublevels 1)))

;;; key bindings and syntax entries

; force 8-bit-set input to translate to Meta
(let ((l (current-input-mode)))
  (setcar (cdr (cdr l)) 't)
  (apply 'set-input-mode l))

(global-set-key "\M-p" 'list-processes)
(global-set-key "\M-l" 'goto-line)
(global-set-key "\M-d" 'downcase-word)
; (global-set-key [?\C-%] 'query-replace-regexp)    ; breaks under 19.25
(global-set-key "\M-\*" 'font-lock-mode)

(add-hook 'discuss-mode-hooks
	  '(lambda ()
	     (define-key discuss-trn-mode-map "m" 'discuss-qa-reply)))

(add-hook 'perl-mode-hook
	  '(lambda ()
;	     (modify-syntax-entry ?\' " " perl-mode-syntax-table)
	     (modify-syntax-entry ?\` " " perl-mode-syntax-table)
	     (modify-syntax-entry ?:  "w" perl-mode-syntax-table)
	     (define-key perl-mode-map "\C-cd" 'describe-perl-symbol)))
(add-hook 'cperl-mode-hook
	  '(lambda ()
	     (define-key cperl-mode-map "\C-cd" 'describe-perl-symbol)))

(add-hook 'tex-mode-hook (function (lambda () (setq ispell-parser 'tex))))

;;; Emacs 19+ highlighting (hilit19 and font-lock-mode)

(if (and window-system (x-display-color-p))
    (progn

      ;: make `M-x hilit' run my hilit19 setup.
      (defun hilit ()
	(interactive)
	(load "hilit"))

      ;: use font locking in elisp mode
      (add-hook 'emacs-lisp-mode-hook
		  '(lambda ()
		     (font-lock-mode 1)))

      ;: load and use Java font locking in Java mode
      (add-hook 'java-mode-hook
		  '(lambda ()
		     (if (not (boundp 'java-font-lock-keywords))
			 (load "/afs/sipb/project/java/elisp/java-f-lck"))
		     (font-lock-mode 1)))
))

;;; Emacs Zephyr stuff

(defvar zwgc-mode-map nil "*Keymap used by the zwgc major mode.")
(if zwgc-mode-map   nil
  (define-prefix-command 'zwgc-mode-map)
  (setq zwgc-mode-map (symbol-function 'zwgc-mode-map))
  (suppress-keymap zwgc-mode-map)
  (define-key zwgc-mode-map "\C-z" 'zsend)
  (define-key zwgc-mode-map "z" 'zsend)
  (define-key zwgc-mode-map "s" 'zwgc)
  (global-set-key "\C-z" 'zwgc-mode-map))

(defun my-replace-in-buffer (match replace)
  (save-excursion
    (goto-char (point-min))
    (while (re-search-forward match nil t)
      (replace-match replace)) ))

(setq zwgc-window-min-height 15
      zwgc-window-max-height 15
      zwgc-bury-buffer nil
      zwgc-jump-on-new nil
      zwgc-running-hook '(lambda ()
			   (define-key zwgc-mode-map "s" 'zwgc-show)
			   (define-key zwgc-mode-map "\C-z" 'zsend)
			   (define-key zwgc-mode-map "z" 'zsend))
      zwgc-got-notice-hook '(lambda ()
			      (my-replace-in-buffer "\\[.?m" ""))
      zwgc-killed-hook '(lambda ()
			  (define-key zwgc-mode-map "s" 'zwgc)))

;;;;; Emacs Lisp code

;; code to display a temporary buffer, killing it on exit.

; NB: this may not work under emacs 19; see ../19/emacs.el for code that will
(defun view-buffer-kill (buffer-or-name)
  "View BUFFER in View mode in another window, *killing it* and returning to
previous buffer when done.  The usual Emacs commands are not available;
instead, a special set of commands (mostly letters and punctuation) are
defined for moving around in the buffer.  Space scrolls forward, Delete
scrolls backward.  For list of all View commands, type ? or h while viewing.

This command runs the normal hook `view-mode-hook'."
  ; Not interactive, since it uses too much prejudice.
  (let ((return-to (current-window-configuration)))
    (switch-to-buffer-other-window buffer-or-name)
    ; oops, "view-mode-enter" doesn't take window configurations in e20,
    ; but we still *really* want to restore one.  hack hack hack.
    (make-local-variable 'view-popup-return-to)
    (setq view-popup-return-to return-to)
    (view-mode-enter nil 'view-popup-kill-buffer)))

(defun view-popup-kill-buffer (buf)
  "Restore window configuration from view-popup-return-to, killing
the previously current buffer.  Just a helper in a gross hack."
  (save-excursion
    (set-buffer buf)
    (if (and (boundp 'view-popup-return-to)
	     view-popup-return-to
	     (window-configuration-p view-popup-return-to))
	(set-window-configuration view-popup-return-to))
    (kill-buffer buf)))

(defun view-popup-text (text &optional buf-name)
  "Display TEXT in a pop-up temporary buffer in View mode.  BUF-NAME
specifies the name used for the buffer; the default is \" *popup*\"."
  (let ((tmpbuf (generate-new-buffer (or buf-name " *popup*"))))
    (save-excursion
      (set-buffer tmpbuf)
      (insert text)
      (goto-char (point-min)) )
    (view-buffer-kill tmpbuf) ))

(defun text-lines-from-list (list)
  "Add a newline to the end of each element of LIST of strings, and
concatenate them all.  Useful for displaying lists of items."
  (mapconcat '(lambda (x) (concat x "\n")) list "") )

;; a "where"-like tool for Emacs Lisp and Info files

(defun find-file-over-path (fname lpath)
  (if (null lpath) nil
    (append (let ((dir (car lpath)))
	      (if (file-directory-p dir)
		  (mapcar (function (lambda (x) (concat dir "/" x)))
			  (file-name-all-completions fname dir))
		nil))
	    (find-file-over-path fname (cdr lpath))) ))

(defun where-file (fname &optional lpath)
  "Sort of like the 'where' command, only for Emacs.  Displays results in a
pop-up buffer (if any are found).  When invoked interactively, searches for
the file through the path in the variable load-path; otherwise, the path can
be specified as an optional second argument."
  (interactive "sFile or library to look for: ")
  (let ((matches (find-file-over-path fname (or lpath load-path))))
    (if matches
	(view-popup-text (text-lines-from-list matches) " *where*")
      (message "%s not found in path." fname) )))
      
(defun where-info (fname)
  "Sort of like the 'where' command, only for Emacs Info files.  Displays
results in a pop-up buffer (if any are found).  Searches for the file
through the contents of Info-directory-list (if it is set), or
Info-default-directory-list."
  (interactive "sInfo file to look for: ")
  (let ((matches (find-file-over-path fname
		  (if (and (boundp 'Info-directory-list) Info-directory-list)
		      Info-directory-list
		    Info-default-directory-list) )))
    (if matches
	(view-popup-text (text-lines-from-list matches) " *where-info*")
      (message "%s not found in Info path." fname) )))
 
;; getting B5 quotes (as well as other quotes)

(defun full-process-or-connection-output (&rest comint-args)
  "Return all output of an output-only process (such as \"fortune\")
or connection (such as qotd).  The arguments are specified in the same
fashion as the arguments-except-first to for make-comint (see there
for details).  Two common cases are
    (full-process-or-connection-output '(\"host.name\" . port))
and
    (full-process-or-connection-output \"program\" nil \"-arg1\" ...)"
  (save-excursion
    (let* ((buffer (apply 'make-comint "full-process-output" comint-args))
	   (process (get-buffer-process buffer))
	   return)
      (set-process-sentinel process '(lambda (proc string)))
      (set-buffer buffer)
      (while (member (process-status process) '(run open))
	(accept-process-output process))
      (setq return (buffer-string))
      (kill-buffer buffer)
      return)) )

(defvar b5-quote-site '("infocalypse.mit.edu" . 17)
  "*Location of the B5 quote server, or name of a program to generate quotes.")
(defun insert-b5-quote ()
  "Get a quote from the B5 quote server and insert it at current point."
  (interactive)
  (insert (full-process-or-connection-output b5-quote-site)))
(defun b5-quote ()
  "Get a quote from the B5 quote server and display it in a pop-up buffer."
  (interactive)
  (view-popup-text (full-process-or-connection-output b5-quote-site)
		   " *Babylon 5*") )

;; random code that doesn't particularly belong anywhere else

(defun tabs-toggle nil
  "Toggle value of indent-tabs-mode."
  (interactive)
  (setq indent-tabs-mode (not indent-tabs-mode))
  (princ (concat "indent-tabs-mode set to " (symbol-name indent-tabs-mode))))

(defun wait-on-process (pname)
  "Wait till a process exits before continuing."
  (if (process-status pname)
    (while (equal 'run (process-status pname)) (sleep-for 2)) ))

(defun anonymous ()
  (discuss 'dont-list)
  (discuss-goto "closet"))

(defun batch-compile ()
  (let ((filename (getenv "BATCH_COMPILE")))
    (if (not filename)
	(setq filename "~/elisp/19/emacs.el"))
    (message "Emacs version: %s  [requested: %s]" emacs-version
	     (or (getenv "EMACS_VERSION") "none"))
    (byte-compile-file filename) ))

(defun append-string-to-file (string filename)
  (save-excursion
    (set-buffer (generate-new-buffer " *append-string*"))
    (insert string)
    (append-to-file (point-min) (point-max) filename)))

(defun highlander ()
  (interactive)
  (find-file "/mit/olcdev/highlander/src/SOURCE_CHANGES")
;  (setq time-stamp-format "%02d%03b%02y %02H:%02M:%02S %u@%h on %s")
;  (add-hook 'ediff-quit-hook
;	    '(lambda ()
;	       (let* ((fA (buffer-file-name ediff-buffer-A))
;		      (fB (buffer-file-name ediff-buffer-B))
;		      (fC (buffer-file-name ediff-buffer-C))
;		      (str (concat "[" (downcase (time-stamp-string)) "]\n")))
;		 (if fA (setq str (concat str          fA "\n")))
;		 (if fB (setq str (concat str "   "    fB "\n")))
;		 (if fC (setq str (concat str "      " fC "\n")))
;		 (append-string-to-file str
;					"/mit/olcdev/highlander/src/EDIFF"))))
  (ediff-directories3 "/mit/olcdev/highlander/src-olta"
		      "/mit/olcdev/highlander/src.rel77"
		      "/mit/olcdev/highlander/src"
		      ""))

(defun case-tags-search (regexp case-insensitive)
  "Like tags-search, but be sure to be case-sensitive."
  (interactive "sCase-sensitive tags search (regexp): \nP")
  (if (equal regexp "")
      nil
    (setq tags-loop-scan (list 'progn
			       (list 'setq 'case-fold-search 
				     (not (not case-insensitive)))
			       (list 're-search-forward regexp nil t))
          tags-loop-operate nil)
    (tags-loop-continue t)))

;;;;; OLCR support

;; OLCR autoloads

(setq my-olcr "/afs/athena/user/b/e/bert/elisp/olcr/")

(autoload 'olcr-list (concat my-olcr "eolcr/olcr")
          "Emacs OLCR" 't)
(autoload 'olcr-list-incolor "olcr-loader"
          "Emacs OLCR with (limited) color" 't)
(autoload 'olcr-loader "olcr-loader"
          "debugging loader for EOLCR 3.4T-19" 't)
(autoload 'olcr-loader-incolor "olcr-loader"
          "color debugging loader for EOLCR 3.4T-19" 't)
(autoload 'olcr-list-si "olcr-loader"
          "Emacs OLCR on SI" 't)

(autoload 'olh-stock-answers "/mit/bert/elisp/olh/olh"
          "Emacs OLH interface." 't)

;; set emacs OLCR hooks -- in part stolen from starflt

;;!!!;; IGNORE all customizations here if "~/.eolcr.debug" exists!
(if (file-exists-p (expand-file-name "~/.eolcr.debug")) 't

  (setq olcr-nickname "Bwahahahahahahaha!"
;	olcr-my-motd-max 3                       ; show motd only once
	olcr-mode-max-instances 10
	olcr-send-signature-file "~/.conf/eolcr/send-signature"
	olcr-mail-header-file    "~/.conf/eolcr/mail-header"
	olcr-mail-signature-file "~/.conf/eolcr/mail-signature"
	olcr-mail-insert-user-question 't
	olcr-fill-user-question 't
	olcr-indent-user-question ">> "
	olcr-mail-unseen-messages-header
	    "\n\nThese are the messages that you haven't seen yet:\n"
	olcr-mail-unseen-messages-prefix ">> "
	olcr-mail-prompt-keep-unseen-messages 't
	olcr-input-hack 't)

  (setq olcr-setup-hook
	'(lambda ()
	   (define-key olcr-basic-map "\M-[28~" 'olcr-help)
	   (define-key olcr-basic-map "q" 'olcr-quit)
;	   (autoload 'olh-stock-answers "/mit/bert/elisp/common/my-olh"
;	     "Emacs OLH interface." 't)
	   )
        olcr-startup-hook
	'(lambda ()
;	   (x-set-name "OLCR" (concat "OLCR @ " (system-name)))
	   (olcr-start-zclient)
	   (olcr-sub-olc-zgrams))
        olcr-quit-hook
	'(lambda ()
	   (olcr-unsub-olc-zgrams)
	   (olcr-stop-zclient)
	   (if (and (boundp 'olcr-dont-quit-emacs) olcr-dont-quit-emacs)
	       (message "olcr-quit-hook: Not quitting Emacs.")
	     (sleep-for 5)
	     (wait-on-process "olcr-flush-temp")
	     (wait-on-process "olcr-unsub-olc")
	     (save-buffers-kill-emacs)
	     ))
        olcr-replay-mode-hook
	'(lambda ()
	   (olcr-indent-mode))
	)
)
;;; end of eolcr stuff

(load "more-19-stuff" 't)	; get minor version specific things

(if noninteractive
    nil
  (message "Welcome to Emacs %s." emacs-version))

;END --- Evil custom-* stuff may appear after this line; NUKE IT FROM ORBIT.
