emacs-devel
[Top][All Lists]
Advanced

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

Re: using glyphs by default in perl-mode


From: joakim
Subject: Re: using glyphs by default in perl-mode
Date: Wed, 05 Jun 2013 19:42:39 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Ted Zlatanov <address@hidden> writes:

> On Wed, 05 Jun 2013 12:13:00 -0400 Stefan Monnier <address@hidden> wrote: 
>
>>> I also thought about `put-text-property' of an image but that's pretty
>>> ugly and special-cases all the code, plus it has update issues in some
>>> cases (deleting characters and reinserting them doesn't trigger the
>>> image again).  It would be really nice to be able to use
>>> `compose-region' and use an image to create a glyph.  For now it's a
>>> TODO but I think it would be a hit with users.  If anyone is interested
>>> or wants to tell me how it could work, let me know.
>
> SM> I think this is pushing it "too far": I'm not opposed to such a feature
> SM> in general, but I'm not sure it would benefit much from sharing some
> SM> code with the current prog-prettify code.
>
> OK.  I'll shelve/stash it for now.
>
> SM> BTW, one problematic part with the use of images is when you need to
> SM> scale them to fit the text's size.
>
> Of course.  I was thinking of a dynamically produced glyph that scales
> down to the text size.  I think SVG can do something like that, scaling
> gracefully.  If you want a bigger image, you increase the font size!
>
> Currently images don't respect the text size which makes them mostly
> unusable in serious editing.

Do you have an idea what the interface would look like?

Since I worked on the ImageMagick support I'm interested in this.


>
>>> The other TODO item is to simplify this support so it doesn't require
>>> special effort when setting `font-lock-defaults'.  I don't know how that
>>> would work internally so I'll wait for Stefan or someone else to give me
>>> hints or implement it.
>
> SM> I think the best way to do that is going to be to provide a function
> SM> that uses font-lock-add-keywords internally.  That function might even
> SM> take the symbols-alist as argument and do the (setq-local
> SM> prog-prettify-alist..) itself, so major modes can just call
> SM> (prog-prettify '(("=>" . ?⇒))).
>
> That would be best.  I'll look into it.
>
> Ted
>
>

-- 
Joakim Verona



reply via email to

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