From: coleman@twinsun.com (Mike Coleman)
Subject: Re: Could anyone send me a .emacs file?
Organization: Twin Sun, Inc
Date: Wed, 16 Sep 1992 01:10:04 GMT

coleman@twinsun.com (Mike Coleman) writes:
>Here's mine:
>(load-file "~/.emacs.elc")

Ok, to be nice, here's my actual .emacs.el.  The way to use this, of course,
is not to try to use it wholesale, because not all of it functions correctly,
and some of it will reference library files you don't have; rather, you should
pick through it, figure out what each piece does, and try it out yourself if
it looks good.

Have fun,
Mike


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;(load "$SATHER_HOME/etc/.emacs")
(setq doc-auto-log-mode-list 
      '(emacs-lisp-mode lisp-mode eiffel-mode sather-mode tex-mode))


(defun C-s-C-q-flow-control ()
  "Use C-s and C-q for flow control; C-^ and C-\ replace them"
  (interactive)
  (set-input-mode nil t)
  (defconst search-repeat-char ?\C-^)	; C-s
  (define-key ctl-x-map "\C-\\" 'toggle-read-only) ; C-x C-q
  (define-key ctl-x-map "\C-^" 'save-buffer) ; C-x C-s
  (define-key esc-map "\C-^" 'isearch-forward-regexp) ; C-x C-s
  (define-key global-map "\C-\\" 'quoted-insert) ; C-q
  (define-key global-map "\C-^" 'isearch-forward)) ; C-s
(setq dired-listing-switches "-algt")
(setq require-final-newline 1)

(setq inhibit-startup-message nil)

(put 'eval-expression 'disabled nil)
(put 'narrow-to-region 'disabled nil)
(put 'narrow-to-page 'disabled nil)

(setq text-mode-hook '(lambda () (auto-fill-mode 1) (abbrev-mode 1)))
(setq lisp-mode-hook '(lambda () (auto-fill-mode 1) (abbrev-mode 1)))
(setq c-mode-hook '(lambda () (auto-fill-mode 1) (abbrev-mode 1)
		     (setq tab-width 4)))
(setq prolog-mode-hook '(lambda () (auto-fill-mode 1) (abbrev-mode 1)))
(setq tex-mode-hook '(lambda () (auto-fill-mode 1) (abbrev-mode 1)))
(setq latex-mode-hook '(lambda () (auto-fill-mode 1) (abbrev-mode 1)))
(setq texinfo-mode-hook '(lambda () (auto-fill-mode 1) (abbrev-mode 1)))
(setq fundamental-mode-hook '(lambda () (setq tab-width 4)))

(setq prolog-eof-string nil)

(setq default-major-mode 'text-mode)

;(setq TeX-dvi-print-command "dlpr")
(setq TeX-default-mode 'LaTeX-mode)


(setq mail-self-blind t)
(setq inhibit-local-variables t)
(setq Info-enable-edit t)

(setq scroll-step 8)

(setq load-path (cons "$HOME/emacs/lisp" load-path))

;(load "term-hook")

;(load "load_status") ;;; obsolete?


;; for K&R style indentation
(setq c-indent-level 4)
(setq c-continued-statement-offset 4)
(setq c-brace-offset -4)
(setq c-argdecl-indent 0)
(setq c-label-offset -4)

(setq c-tab-always-indent t)
(setq c-auto-newline nil)
(setq comment-multi-line t)

(setq TeX-dvi-print-command "dvi2pub3")
(setq TeX-show-queue-command "lpq -Ppub3")

(read-abbrev-file "")

(setq default-fill-column 78)

; (setq backup-by-copying-when-linked 1)
; (setq default-mode-line-format "%1*%1* Emacs: %10b  %M  %[(%m)%]--%3p-%-")
; (setq display-time-day-and-date 1)
; (display-time)
; (setq mode-line-highlight t)
; (setq delete-auto-save-files t)
; (setq c-argdecl-indent 2)
; (defun indented-text-fill-mode () (indented-text-mode) (auto-fill-mode 1))
(setq auto-mode-alist
      (append '(("\\.t$" . lisp-mode) 
		("\\.n$" . indented-text-fill-mode)
		("\\.cq$" . c-mode)
		("\\.hq$" . c-mode)
		("\\.bib$" . bibtex-mode)
		("\\.tcl$" . fundamental-mode)
		)
	      auto-mode-alist))

;(load "autoinsert")
;(setq auto-insert-directory "~/emacs/insert-skeletons/")
;(setq auto-insert-alist
;      '(
;	("\\.pl$" . "prolog-insert.pl")
;	("\\.tex$" . "latex-insert.tex")
;	("\\.c$" . "c-insert.c")
;	("\\.h$" . "h-insert.h")
;	("\\.cq$" . "cq-insert.cq")
;	("\\.hq$" . "hq-insert.cq")
;	("[Mm]akefile" . "makefile")
;	("\\.bib$" . "bibtex-insert.tex")
;	)
;      )


(defun make (arg)
  "Run make"
  (interactive "P")
  (compile "make "))
;(defun print (arg)
;  "Print contents of buffer through enscript -2r -fCourier5"
;  (interactive "P")
;  (compile (concat "enscript -2r -fCourier5 -P" printer-name " " (buffer-name))))
;(setq printer-name "pub3")
;(defun check-print (arg)
;  "Print contents of buffer through enscript -2r -fCourier5"
;  (interactive "P")
;  (compile (concat "lpq -P" printer-name)))
(defun x-small-font (arg)
  "Change to small font"
  (interactive "P")
  (x-set-font "6x10")
  (x-create-x-window "169x76+0+0"))
(defun x-large-font (arg)
  "Change to large font"
  (interactive "P")
  (x-set-font "8x13")
  (x-create-x-window "127x58+0+0"))
(defun x-normal-font (arg)
  "Change to normal font"
  (interactive "P")
  (x-set-font "6x13")
  (x-create-x-window "80x58+0+0"))

(global-set-key "\C-xl" 'what-line)

;
; Fix stupid EMACS problem.
;
(global-set-key "\C-h" 'delete-backward-char)
(global-set-key "\C-?" 'delete-backward-char)
(setq search-delete-char ?\^h)
(define-key esc-map "h" 'help-command)
(define-key esc-map "?" 'help-command)
(define-key esc-map "\C-h" 'backward-kill-word)
(define-key help-map "\M-h" 'help-for-help)
(define-key help-map "\M-?" 'help-for-help)
;
;(define-key esc-map "s" 'isearch-forward)
;(define-key esc-map "r" 'isearch-backward)
;(define-key esc-map "\C-i" 'indent-relative)
;
;(global-set-key "\C-xL" 'goto-line)
;(global-set-key "\C-xQ" 'quoted-insert)
;(global-set-key "\C-xr" 'replace-regexp)
;(global-set-key "\C-x\C-c" nil)
;(global-set-key "\C-xC" 'save-buffers-kill-emacs)
;
; (load "server.el")
; (server-edit)

;(server-start)

(require 'rcs)
(global-set-key "\C-ci" 'rcs-ci-buffer)
(global-set-key "\C-co" 'rcs-co-buffer)
(global-set-key "\C-cl" 'rcs-log-buffer)
(global-set-key "\C-cd" 'rcs-diff-buffer)
(global-set-key "\C-cr" 'rcs-refresh-buffer)
(global-set-key "\C-cR" 'rcs-revert-buffer)
(global-set-key "\C-cs" 'rcs-show-log-buffer)


;; this hook should be tried before autoinsert stuff
(setq find-file-not-found-hooks (cons 'rcs-try-file find-file-not-found-hooks))
(setq find-file-hooks (cons 'rcs-hack-modeline find-file-hooks))
(setq rcs-executable-path "/usr/local/bin")
(setq rcs-make-backup-files t)
(setq rcs-initial-access nil)
(setq rcs-use-user-branch nil)


;; buffer funcs

(defun raise-buffer ()
  (interactive)
  (let ((buffer-list (nreverse (buffer-list)))
	buffer)
    (while (string-match "\\` " 
			 (buffer-name
			  (prog1 (setq buffer (car buffer-list))
			    (setq buffer-list (cdr buffer-list))))))
    (switch-to-buffer buffer)))

(global-set-key "\C-c\C-p" 'bury-buffer)
(global-set-key "\C-c\C-n" 'raise-buffer)


;; Dinh's tag stuff
(require 'tags)
(require 'tag-ring)
(global-set-key "\e." 'find-tag-ring)
(global-set-key "\ep" 'prev-tag)
(global-set-key "\en" 'next-tag)

(global-set-key "\e\C-l" 'goto-line)


(global-set-key "\C-c)" '(lambda () (interactive) (blink-matching-open)))

(setq r2b-load-quietly t)

(autoload 'bibtex-mode "bibtex-mode" nil t)
(autoload 'r2b-convert-buffer "refer2bibtex" nil t)

-- 
I'm waiting to find a label on toasters saying "object oriented" - you give
the toaster object a "bread" message and it returns a "toast" message...
                                                       --Phill Hallam-Baker
Newsgroups: gnu.emacs.help