all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Image overlays using font-lock-add-keywords() and create-image() for more compact code view
@ 2008-06-05 20:09 Nordlöw
  2008-06-06 12:52 ` Johan Bockgård
  0 siblings, 1 reply; 3+ messages in thread
From: Nordlöw @ 2008-06-05 20:09 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-10 14:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-05 20:09 Image overlays using font-lock-add-keywords() and create-image() for more compact code view Nordlöw
2008-06-06 12:52 ` Johan Bockgård
2008-06-10 14:47   ` Nordlöw

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.