Pensieri di un lunatico minore

16 May 2008 Programming

Emacs color themes

In my continuing adventures getting back to using Emacs, I was working on tweaking the color theme that I use. While it’s based on someone else’s originally, I’ve made quite a few minor changes. Somewhere along the line, I messed it up and started getting all sorts of strange errors that made no sense. They couldn’t possibly be wrong.

Here’s the old one:

(defun color-theme-charcoal-personal ()
  (interactive)
  (color-theme-install
   '(color-theme-charcoal-gray-personal
     ((background-color . "Grey15")
     ...

And here it is, fixed:

(defun color-theme-charcoal-personal ()
  (interactive)
  (color-theme-install
   '(color-theme-charcoal-personal
     ((background-color . "Grey15")
     ...

Do you see the difference? No? Look carefully.

It seems that if you name the defun differently than the first element of the first list passed to color-theme-install, it goes wonky. Unfortunately, the debugger wasn’t much help, and it was simply by stepping through a comparison with the original to see if somehow I’d missed something that I found the place where I’d screwed up. Something annoyingly tiny, and a mistake that should have generated a more useful error.

If you want the Elisp code, you can find it here: color-theme-charcoal-personal.el

This entry was posted at 9:38 am on 16 May 2008 and is filed under Programming. You can follow any responses to this entry through the post-specific RSS 2.0 feed.

[...] Emacs color themes at Pensieri di un lunatico minore oooohh, shiny. someone’s got a new emacs theme. (tags: emacs chrispetrilli theme colors) [...]

You can leave a response, or trackback from your own site.