[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Spinning lambda



I'm so envious of Eli's spinning lambda that I had
to boost up the colour of my (X)Emacs scheme-mode (in
lieu of LSD).  If you're interested in a slightly
more colourful Emacs cut and paste the below code
into your .emacs

Any improvements gratefully accepted.

Noel

(x-make-font-bold (font-name (face-font 'default))))
(set-face-foreground 'font-lock-keyword-face "black")
(set-face-foreground 'font-lock-string-face
"forestgreen")
(set-face-foreground 'font-lock-doc-string-face
"darkgreen")
(set-face-font 'font-lock-function-name-face 
(x-make-font-bold (font-name (face-font 'default))))
(set-face-foreground 'font-lock-function-name-face
"royalblue")
(set-face-foreground 'font-lock-comment-face "red")
(set-face-foreground 'font-lock-preprocessor-face
"maroon")
(set-face-foreground 'font-lock-type-face
"mediumblue")
(if (not (find-face 'font-lock-variable-name-face))
    (make-face 'font-lock-variable-name-face))
(set-face-foreground 'font-lock-variable-name-face
"darkorchid")
(if (not (find-face 'font-lock-application-face))
    (make-face 'font-lock-application-face))
(set-face-foreground 'font-lock-application-face
"darkred")
(if (not (find-face 'font-lock-value-face))
    (make-face 'font-lock-value-face))
(set-face-foreground 'font-lock-value-face "seagreen")


(defun my-scheme-mode-hook ()
  (setq scheme-font-lock-keywords 
		'(("(\\(module\\)\\>[ 	\n]*\\(\\sw+\\)\\>[ 
\n]*\\(\\sw+\\)"
		   (1 font-lock-keyword-face)
		   (2 font-lock-variable-name-face)
		   (3 font-lock-variable-name-face))
		  ("(\\(require\\)" . 1)
		  ("(\\(provide\\)" . 1)
		  ("(\\(define-\\(signature\\|values\\)\\)" . 1)
		  ("(\\(define[ 	]*\\)"
		   (1 font-lock-keyword-face)
		   ("(\\(\\w+\\)\\(.*\\))" nil nil
			(1 font-lock-function-name-face)
			(2 font-lock-variable-name-face))
		   ("\\w+" nil nil (0
font-lock-function-name-face)))
		 
("(\\(define\\(\\(\\|-\\(generic\\(\\|-procedure\\)\\|method\\)\\)\\|\\(-syntax\\)\\|\\(-class\\)\\)\\)\\>[
	]*(?\\(\\sw+\\)?" 
		   (1 font-lock-keyword-face)
		   (8 (cond ((match-beginning 3) (quote
font-lock-function-name-face))
					((match-beginning 6) (quote
font-lock-variable-name-face))
					(t (quote font-lock-type-face)))
			  nil t))
		 
("(\\(and\\|begin\\|c\\(a\\(ll\\(-with-\\(current-continuation\\|input-file\\|output-file\\)\\|/cc\\)\\|se\\)\\|ond\\)\\|d\\(elay\\|o\\)\\|else\\|for-each\\|if\\|l\\(ambda\\|ib\\|et\\(-syntax\\|\\*?\\|-values\\|rec\\(\\|-syntax\\)\\)\\)\\|map\\|not\\|or\\|syntax\\(\\|-rules\\)\\|\\with-\\(input-from-file\\|output-from-file\\)\\)\\>"
. 1)
		  ("\\<<\\sw+>\\>" . font-lock-type-face)
		  ("\\<:\\sw+\\>" . font-lock-reference-face)
		  ("(\\(\\w+\\)" 
		   (1 font-lock-application-face))
		  ("\\w+" . font-lock-value-face))))
(add-hook 'scheme-mode-hook 'my-scheme-mode-hook)


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/