Mr Speaker

A most useful function

Hot on the heels of my web colors rant, comes this amazing piece of Emacs Lisp I now have in my init file:

(defun web-color ()
  (interactive)
  (let ((cols '("AliceBlue" "AntiqueWhite" "Aqua" "Aquamarine"
     "Azure" "Beige" "Bisque" "Black" "BlanchedAlmond" "Blue"
     "BlueViolet" "Brown" "BurlyWood" "CadetBlue" "Chartreuse"
     "Chocolate" "Coral" "CornflowerBlue" "Cornsilk" "Crimson" "Cyan"
     "DarkBlue" "DarkCyan" "DarkGoldenRod" "DarkGray" "DarkGreen"
     "DarkKhaki" "DarkMagenta" "DarkOliveGreen" "Darkorange" "DarkOrchid"
     "DarkRed" "DarkSalmon" "DarkSeaGreen" "DarkSlateBlue" "DarkSlateGray"
     "DarkTurquoise" "DarkViolet" "DeepPink" "DeepSkyBlue" "DimGray"
     "DodgerBlue" "FireBrick" "FloralWhite" "ForestGreen" "Fuchsia"
     "Gainsboro" "GhostWhite" "Gold" "GoldenRod" "Gray" "Green"
     "GreenYellow" "HoneyDew" "HotPink" "IndianRed" "Indigo" "Ivory"
     "Khaki" "Lavender" "LavenderBlush" "LawnGreen" "LemonChiffon"
     "LightBlue" "LightCoral" "LightCyan" "LightGoldenRodYellow"
     "LightGray" "LightGreen" "LightPink" "LightSalmon" "LightSeaGreen"
     "LightSkyBlue" "LightSlateGray" "LightSteelBlue" "LightYellow" "Lime"
     "LimeGreen" "Linen" "Magenta" "Maroon" "MediumAquaMarine" "MediumBlue"
     "MediumOrchid" "MediumPurple" "MediumSeaGreen" "MediumSlateBlue"
     "MediumSpringGreen" "MediumTurquoise" "MediumVioletRed" "MidnightBlue"
     "MintCream" "MistyRose" "Moccasin" "NavajoWhite" "Navy" "OldLace"
     "Olive" "OliveDrab" "Orange" "OrangeRed" "Orchid" "PaleGoldenRod"
     "PaleGreen" "PaleTurquoise" "PaleVioletRed" "PapayaWhip" "PeachPuff"
     "Peru" "Pink" "Plum" "PowderBlue" "Purple" "Red" "RosyBrown" "RoyalBlue"
     "SaddleBrown" "Salmon" "SandyBrown" "SeaGreen" "SeaShell" "Sienna"
     "Silver" "SkyBlue" "SlateBlue" "SlateGray" "Snow" "SpringGreen"
     "SteelBlue" "Tan" "Teal" "Thistle" "Tomato" "Turquoise" "Violet"
     "Wheat" "White" "WhiteSmoke" "Yellow" "YellowGreen")))
    (insert (nth (random (length cols)) cols))))

Calling it with `M-x w-c` (from anywhere you care to type things) injects a random entry - so you get a wonderful rainbow of weird names, instead of forgetting them all every time and just choosing "lemonchiffon".

Debugging has never looked so good.

Captcha! Please type 'radical' here: *
How did you find this thingo? *