help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Image overlays using font-lock-add-keywords() and create-image() for mor


From: Nordlöw
Subject: Image overlays using font-lock-add-keywords() and create-image() for more compact code view
Date: Thu, 5 Jun 2008 13:09:06 -0700 (PDT)
User-agent: G2/1.0

I thought the following snippet of code should give me a new more
compact view of gtk-code.

(defun pretty-gtk ()
  "Highlight symbols starting with gtk_ using the GIMP Tool Kit (GTK)
Icon."
  (font-lock-add-keywords
   nil
   `(("\\_<\\(gtk\\)_"
      (1 '(face nil pretty ,(create-image "~/pnw/images/gtk-logo-rgb-
cropped-10x13.png")))))))
(add-hook 'c-mode-common-hook 'pretty-gtk)

It does not show the image overlay, however... What have I missed?

/Nordlöw


reply via email to

[Prev in Thread] Current Thread [Next in Thread]