Emacs Function of the Day: propertize

Today's Emacs function of the day is propertize. It allows you to format text in ways that are plain pretty. As an example, here's code to insert "Gah! I'm green!" into a buffer:

(insert (propertize "Gah! I'm green!" 'face '(:foreground "#00ff00" :background "#005000")))

Reply

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
More information about formatting options

Ad's by Google