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

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

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


From: Nordlöw
Subject: Re: Image overlays using font-lock-add-keywords() and create-image() for more compact code view
Date: Tue, 10 Jun 2008 07:47:02 -0700 (PDT)
User-agent: G2/1.0

On 6 Juni, 14:52, bojohan+n...@dd.chalmers.se (Johan Bockgård) wrote:
> Nordlöw <per.nord...@gmail.com> writes:
> > 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."
>
>     (add-to-list 'char-property-alias-alist '(display pretty))
>     (add-to-list 'font-lock-extra-managed-props 'pretty)
>
> >   (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?
>
> This does not use overlays, BTW.
>
> --
> Johan Bockgård

Thanks!

/Nordlöw


reply via email to

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