home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / emacs / help / 4149 < prev    next >
Encoding:
Text File  |  1992-09-15  |  7.1 KB  |  249 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!ucla-cs!twinsun!coleman
  3. From: coleman@twinsun.com (Mike Coleman)
  4. Subject: Re: Could anyone send me a .emacs file?
  5. Message-ID: <bj0_CDh{@twinsun.com>
  6. Sender: usenet@twinsun.com
  7. Nntp-Posting-Host: shadow
  8. Organization: Twin Sun, Inc
  9. References: <jxu.716151194@black.clarku.edu> <bj-DR1ZN@twinsun.com>
  10. Date: Wed, 16 Sep 1992 01:10:04 GMT
  11. Lines: 236
  12.  
  13. coleman@twinsun.com (Mike Coleman) writes:
  14. >Here's mine:
  15. >(load-file "~/.emacs.elc")
  16.  
  17. Ok, to be nice, here's my actual .emacs.el.  The way to use this, of course,
  18. is not to try to use it wholesale, because not all of it functions correctly,
  19. and some of it will reference library files you don't have; rather, you should
  20. pick through it, figure out what each piece does, and try it out yourself if
  21. it looks good.
  22.  
  23. Have fun,
  24. Mike
  25.  
  26.  
  27. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  28. ;(load "$SATHER_HOME/etc/.emacs")
  29. (setq doc-auto-log-mode-list 
  30.       '(emacs-lisp-mode lisp-mode eiffel-mode sather-mode tex-mode))
  31.  
  32.  
  33. (defun C-s-C-q-flow-control ()
  34.   "Use C-s and C-q for flow control; C-^ and C-\ replace them"
  35.   (interactive)
  36.   (set-input-mode nil t)
  37.   (defconst search-repeat-char ?\C-^)    ; C-s
  38.   (define-key ctl-x-map "\C-\\" 'toggle-read-only) ; C-x C-q
  39.   (define-key ctl-x-map "\C-^" 'save-buffer) ; C-x C-s
  40.   (define-key esc-map "\C-^" 'isearch-forward-regexp) ; C-x C-s
  41.   (define-key global-map "\C-\\" 'quoted-insert) ; C-q
  42.   (define-key global-map "\C-^" 'isearch-forward)) ; C-s
  43. (setq dired-listing-switches "-algt")
  44. (setq require-final-newline 1)
  45.  
  46. (setq inhibit-startup-message nil)
  47.  
  48. (put 'eval-expression 'disabled nil)
  49. (put 'narrow-to-region 'disabled nil)
  50. (put 'narrow-to-page 'disabled nil)
  51.  
  52. (setq text-mode-hook '(lambda () (auto-fill-mode 1) (abbrev-mode 1)))
  53. (setq lisp-mode-hook '(lambda () (auto-fill-mode 1) (abbrev-mode 1)))
  54. (setq c-mode-hook '(lambda () (auto-fill-mode 1) (abbrev-mode 1)
  55.              (setq tab-width 4)))
  56. (setq prolog-mode-hook '(lambda () (auto-fill-mode 1) (abbrev-mode 1)))
  57. (setq tex-mode-hook '(lambda () (auto-fill-mode 1) (abbrev-mode 1)))
  58. (setq latex-mode-hook '(lambda () (auto-fill-mode 1) (abbrev-mode 1)))
  59. (setq texinfo-mode-hook '(lambda () (auto-fill-mode 1) (abbrev-mode 1)))
  60. (setq fundamental-mode-hook '(lambda () (setq tab-width 4)))
  61.  
  62. (setq prolog-eof-string nil)
  63.  
  64. (setq default-major-mode 'text-mode)
  65.  
  66. ;(setq TeX-dvi-print-command "dlpr")
  67. (setq TeX-default-mode 'LaTeX-mode)
  68.  
  69.  
  70. (setq mail-self-blind t)
  71. (setq inhibit-local-variables t)
  72. (setq Info-enable-edit t)
  73.  
  74. (setq scroll-step 8)
  75.  
  76. (setq load-path (cons "$HOME/emacs/lisp" load-path))
  77.  
  78. ;(load "term-hook")
  79.  
  80. ;(load "load_status") ;;; obsolete?
  81.  
  82.  
  83. ;; for K&R style indentation
  84. (setq c-indent-level 4)
  85. (setq c-continued-statement-offset 4)
  86. (setq c-brace-offset -4)
  87. (setq c-argdecl-indent 0)
  88. (setq c-label-offset -4)
  89.  
  90. (setq c-tab-always-indent t)
  91. (setq c-auto-newline nil)
  92. (setq comment-multi-line t)
  93.  
  94. (setq TeX-dvi-print-command "dvi2pub3")
  95. (setq TeX-show-queue-command "lpq -Ppub3")
  96.  
  97. (read-abbrev-file "")
  98.  
  99. (setq default-fill-column 78)
  100.  
  101. ; (setq backup-by-copying-when-linked 1)
  102. ; (setq default-mode-line-format "%1*%1* Emacs: %10b  %M  %[(%m)%]--%3p-%-")
  103. ; (setq display-time-day-and-date 1)
  104. ; (display-time)
  105. ; (setq mode-line-highlight t)
  106. ; (setq delete-auto-save-files t)
  107. ; (setq c-argdecl-indent 2)
  108. ; (defun indented-text-fill-mode () (indented-text-mode) (auto-fill-mode 1))
  109. (setq auto-mode-alist
  110.       (append '(("\\.t$" . lisp-mode) 
  111.         ("\\.n$" . indented-text-fill-mode)
  112.         ("\\.cq$" . c-mode)
  113.         ("\\.hq$" . c-mode)
  114.         ("\\.bib$" . bibtex-mode)
  115.         ("\\.tcl$" . fundamental-mode)
  116.         )
  117.           auto-mode-alist))
  118.  
  119. ;(load "autoinsert")
  120. ;(setq auto-insert-directory "~/emacs/insert-skeletons/")
  121. ;(setq auto-insert-alist
  122. ;      '(
  123. ;    ("\\.pl$" . "prolog-insert.pl")
  124. ;    ("\\.tex$" . "latex-insert.tex")
  125. ;    ("\\.c$" . "c-insert.c")
  126. ;    ("\\.h$" . "h-insert.h")
  127. ;    ("\\.cq$" . "cq-insert.cq")
  128. ;    ("\\.hq$" . "hq-insert.cq")
  129. ;    ("[Mm]akefile" . "makefile")
  130. ;    ("\\.bib$" . "bibtex-insert.tex")
  131. ;    )
  132. ;      )
  133.  
  134.  
  135. (defun make (arg)
  136.   "Run make"
  137.   (interactive "P")
  138.   (compile "make "))
  139. ;(defun print (arg)
  140. ;  "Print contents of buffer through enscript -2r -fCourier5"
  141. ;  (interactive "P")
  142. ;  (compile (concat "enscript -2r -fCourier5 -P" printer-name " " (buffer-name))))
  143. ;(setq printer-name "pub3")
  144. ;(defun check-print (arg)
  145. ;  "Print contents of buffer through enscript -2r -fCourier5"
  146. ;  (interactive "P")
  147. ;  (compile (concat "lpq -P" printer-name)))
  148. (defun x-small-font (arg)
  149.   "Change to small font"
  150.   (interactive "P")
  151.   (x-set-font "6x10")
  152.   (x-create-x-window "169x76+0+0"))
  153. (defun x-large-font (arg)
  154.   "Change to large font"
  155.   (interactive "P")
  156.   (x-set-font "8x13")
  157.   (x-create-x-window "127x58+0+0"))
  158. (defun x-normal-font (arg)
  159.   "Change to normal font"
  160.   (interactive "P")
  161.   (x-set-font "6x13")
  162.   (x-create-x-window "80x58+0+0"))
  163.  
  164. (global-set-key "\C-xl" 'what-line)
  165.  
  166. ;
  167. ; Fix stupid EMACS problem.
  168. ;
  169. (global-set-key "\C-h" 'delete-backward-char)
  170. (global-set-key "\C-?" 'delete-backward-char)
  171. (setq search-delete-char ?\^h)
  172. (define-key esc-map "h" 'help-command)
  173. (define-key esc-map "?" 'help-command)
  174. (define-key esc-map "\C-h" 'backward-kill-word)
  175. (define-key help-map "\M-h" 'help-for-help)
  176. (define-key help-map "\M-?" 'help-for-help)
  177. ;
  178. ;(define-key esc-map "s" 'isearch-forward)
  179. ;(define-key esc-map "r" 'isearch-backward)
  180. ;(define-key esc-map "\C-i" 'indent-relative)
  181. ;
  182. ;(global-set-key "\C-xL" 'goto-line)
  183. ;(global-set-key "\C-xQ" 'quoted-insert)
  184. ;(global-set-key "\C-xr" 'replace-regexp)
  185. ;(global-set-key "\C-x\C-c" nil)
  186. ;(global-set-key "\C-xC" 'save-buffers-kill-emacs)
  187. ;
  188. ; (load "server.el")
  189. ; (server-edit)
  190.  
  191. ;(server-start)
  192.  
  193. (require 'rcs)
  194. (global-set-key "\C-ci" 'rcs-ci-buffer)
  195. (global-set-key "\C-co" 'rcs-co-buffer)
  196. (global-set-key "\C-cl" 'rcs-log-buffer)
  197. (global-set-key "\C-cd" 'rcs-diff-buffer)
  198. (global-set-key "\C-cr" 'rcs-refresh-buffer)
  199. (global-set-key "\C-cR" 'rcs-revert-buffer)
  200. (global-set-key "\C-cs" 'rcs-show-log-buffer)
  201.  
  202.  
  203. ;; this hook should be tried before autoinsert stuff
  204. (setq find-file-not-found-hooks (cons 'rcs-try-file find-file-not-found-hooks))
  205. (setq find-file-hooks (cons 'rcs-hack-modeline find-file-hooks))
  206. (setq rcs-executable-path "/usr/local/bin")
  207. (setq rcs-make-backup-files t)
  208. (setq rcs-initial-access nil)
  209. (setq rcs-use-user-branch nil)
  210.  
  211.  
  212. ;; buffer funcs
  213.  
  214. (defun raise-buffer ()
  215.   (interactive)
  216.   (let ((buffer-list (nreverse (buffer-list)))
  217.     buffer)
  218.     (while (string-match "\\` " 
  219.              (buffer-name
  220.               (prog1 (setq buffer (car buffer-list))
  221.                 (setq buffer-list (cdr buffer-list))))))
  222.     (switch-to-buffer buffer)))
  223.  
  224. (global-set-key "\C-c\C-p" 'bury-buffer)
  225. (global-set-key "\C-c\C-n" 'raise-buffer)
  226.  
  227.  
  228. ;; Dinh's tag stuff
  229. (require 'tags)
  230. (require 'tag-ring)
  231. (global-set-key "\e." 'find-tag-ring)
  232. (global-set-key "\ep" 'prev-tag)
  233. (global-set-key "\en" 'next-tag)
  234.  
  235. (global-set-key "\e\C-l" 'goto-line)
  236.  
  237.  
  238. (global-set-key "\C-c)" '(lambda () (interactive) (blink-matching-open)))
  239.  
  240. (setq r2b-load-quietly t)
  241.  
  242. (autoload 'bibtex-mode "bibtex-mode" nil t)
  243. (autoload 'r2b-convert-buffer "refer2bibtex" nil t)
  244.  
  245. -- 
  246. I'm waiting to find a label on toasters saying "object oriented" - you give
  247. the toaster object a "bread" message and it returns a "toast" message...
  248.                                                        --Phill Hallam-Baker
  249.