We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

perpet on 05/28/08


Tagged

emacs


Versions (?)


Random mode-line color


Published in: Emacs Lisp 


URL: set-random-mode-line-background

When called, this function sets the background color of the mode-line to one of the defined colors randomly.

  1. (defun set-random-mode-line-background() (interactive)
  2. (setq ncolors (length (defined-colors)))
  3. (random t)
  4. (set-face-background 'mode-line (nth (random ncolors) (defined-colors))))

Report this snippet 

You need to login to post a comment.