All pastes #885865 Raw Edit

Paul Goins

public text v1 · immutable
#885865 ·published 2008-01-31 05:22 UTC
rendered paste body
;; From http://www.postulate.org/emacs.php: .emacs self-compilation wrapper
(defvar init-top-level t)
(if init-top-level
	(let ((init-top-level nil))
	  (if (file-newer-than-file-p "~/.emacs" "~/.emacs.elc")
		  (progn
            (display-warning :warning ".emacs has been modified; reload to ensure changes take effect.")
			(load "~/.emacs")
			(byte-compile-file "~/.emacs"))
        (progn
          (load "~/.emacs.elc"))))
  (progn

    ;; Setup basic coloring
    (set-background-color "Black")
    (set-foreground-color "White")
    (tool-bar-mode 0)
    (line-number-mode t)
    (column-number-mode t)

	;; From emacs documentation: http://www.gnu.org/software/emacs/windows/faq4.html#font-lock
	(cond ((fboundp 'global-font-lock-mode)
		   ;; customize face attributes
		   (setq font-lock-face-attributes
				 ;; Symbol-for-Face Foreground Background Bold Italic Underline
				 '((font-lock-comment-face       "LimeGreen")
				   (font-lock-string-face        "Gold")
				   (font-lock-keyword-face       "RoyalBlue")
				   (font-lock-function-name-face "Blue")
				   (font-lock-variable-name-face "CornflowerBlue")
				   (font-lock-type-face          "Maroon")
				   ;; New faces, possibly from E22?
				   (font-lock-constant-face      "Purple")
				   (font-lock-preprocessor-face  "Red")
				   (font-lock-warning-face       "Red")
				   (font-lock-negation-char-face "Red")
				   ;;(font-lock-builtin-face       "White")
				   ;;(font-lock-doc-face           "White")
				   ))
		   ;; Load the font-lock package.
		   (require 'font-lock)
		   ;; Maximum colors
		   (setq font-lock-maximum-decoration t)
		   ;; Turn on font-lock in all modes that support it
		   (global-font-lock-mode t)))

	;;;; OLD CODE
	;;(cond ((fboundp 'global-font-lock-mode)
	;;	   ;; Turn on font-lock in all modes that support it
	;;	   (global-font-lock-mode t)
	;;	   ;; Maximum colors
	;;	   (setq font-lock-maximum-decoration t)))

	;; Copied from http://www.webservertalk.com/archive310-2005-7-1133157.html
	(add-hook
	 'c-mode-common-hook
	 '(lambda ()
		(c-set-style "Stroustrup")
		(local-set-key (kbd "RET") 'newline-and-indent)
		(setq tab-width 4
			  standard-indent 4
			  indent-tabs-mode t)))

	(add-hook
	 'nxml-mode-hook
	 '(lambda ()
		(local-set-key (kbd "RET") 'newline-and-indent)
		(setq nxml-child-indent 4
			  tab-width 4
			  standard-indent 4
			  indent-tabs-mode t)))

	;; From http://deepcopy.org/emacs/cpp_font_lock.html:
	;; Add .h files to c++ mode
	(add-to-list 'auto-mode-alist '("\\.h$" . c++-mode))

	;; Based off of http://people.ubuntu-in.org/~ghoseb/dotemacs
	;; General-purpose tab settings
	(setq-default tab-width 4
				  standard-indent 4
				  indent-tabs-mode t)

	;; This stuff found its way into my ~/.emacs file somehow.
	;; Nothing is in them though, so commenting them out.

	;;(custom-set-variables
	;;  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
	;;  ;; Your init file should contain only one such instance.
	;; )

	;;(custom-set-faces
	;;  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
	;;  ;; Your init file should contain only one such instance.
	;; )

	;; End of autocompilation wrapper
	))

(add-to-list 'load-path "~/dev/slime-2.0/")  ;; your SLIME directory
(setq inferior-lisp-program "/usr/bin/lisp") ;; your Lisp system
(require 'slime)
(slime-setup)