I was working on a dashboard for blogging in emacs as part of my current goal of learning
emacs lisp, and I would a very annoying problem. I wanted to color certain lines, this isn't syntax highlighting, merely, coloring of key lines.
At first I duckduckgo'd and duckduckgo'd, but all I could find was syntax highlighting of keywords and this page. I looked at
propertize. I was trying the property
face, however, the property I wanted isn't
font-lock-face. Why? It has something to do with
font-lock-mode… it was a good half of a day wasted. Anyways, I ended up with a nice little function for highlighting the current line:
1: (defun blog-set-line-face (face) 2: (add-text-properties 3: (line-beginning-position) 4: (line-end-position) 5: `(font-lock-face ,face))) 6:
To go along with the color theme, you can use the color theme faces:
I'll probably throw the initial verion of
blog.el on github in the next few days.