unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: Re: using glyphs by default in perl-mode
Date: Wed, 05 Jun 2013 13:28:12 -0400	[thread overview]
Message-ID: <87txlcxyab.fsf@lifelogs.com> (raw)
In-Reply-To: jwv1u8gr15w.fsf-monnier+emacs@gnu.org

On Wed, 05 Jun 2013 12:13:00 -0400 Stefan Monnier <monnier@IRO.UMontreal.CA> 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.

>> 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




  reply	other threads:[~2013-06-05 17:28 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-30  0:50 using glyphs by default in perl-mode Dan Nicolaescu
2013-05-05  4:37 ` Stefan Monnier
2013-05-05  7:34   ` James Cloos
2013-05-06  1:09     ` Stefan Monnier
2013-05-06  4:26       ` Dan Nicolaescu
2013-05-06 15:09         ` Stefan Monnier
2013-05-07 16:32           ` Dan Nicolaescu
2013-05-07 21:20             ` Stefan Monnier
2013-05-08  3:22               ` Dan Nicolaescu
2013-05-08  4:02                 ` Stefan Monnier
2013-05-09 16:31                   ` Dan Nicolaescu
2013-05-09 16:39                     ` Eli Zaretskii
2013-05-09 17:22                       ` Stefan Monnier
2013-05-09 18:39                         ` Dan Nicolaescu
2013-05-09 18:58                         ` Andreas Röhler
2013-05-09 19:31                         ` James Cloos
2013-05-17 13:01                         ` Ted Zlatanov
2013-05-17 15:48                           ` Stefan Monnier
2013-05-19  2:50                             ` Ted Zlatanov
2013-05-30  0:01                               ` Dan Nicolaescu
2013-05-30 14:47                                 ` Ted Zlatanov
2013-05-30 17:18                                   ` Stefan Monnier
2013-05-30 20:32                                     ` Ted Zlatanov
2013-06-01  6:29                                     ` Dan Nicolaescu
2013-06-01 13:46                                       ` Ted Zlatanov
2013-06-01 14:47                                         ` Stefan Monnier
2013-06-02 12:35                                           ` Ted Zlatanov
2013-06-02 15:52                                             ` Stefan Monnier
2013-06-03  2:02                                               ` Ted Zlatanov
2013-06-03  2:04                                                 ` Ted Zlatanov
2013-06-03  7:04                                                   ` Stefan Monnier
2013-06-04  1:52                                                     ` Ted Zlatanov
2013-06-04 14:28                                                       ` Davis Herring
2013-06-04 17:20                                                       ` Stefan Monnier
2013-06-04 20:06                                                         ` Ted Zlatanov
2013-06-05  1:27                                                           ` Stefan Monnier
2013-06-05 14:45                                                             ` Ted Zlatanov
2013-06-05 16:13                                                               ` Stefan Monnier
2013-06-05 17:28                                                                 ` Ted Zlatanov [this message]
2013-06-05 17:42                                                                   ` joakim
2013-06-05 17:58                                                                     ` Ted Zlatanov
2013-06-05 17:50                                                                   ` Ted Zlatanov
2013-06-05 18:52                                                                   ` Stefan Monnier
2013-06-05 19:36                                                                     ` Ted Zlatanov
2013-06-05 20:13                                                                       ` joakim
2013-06-05 16:43                                                               ` Glenn Morris
2013-06-05 17:52                                                                 ` Ted Zlatanov
2013-06-05 18:07                                                                   ` Glenn Morris
2013-06-05 18:33                                                                     ` Ted Zlatanov
2013-06-05 18:55                                                                   ` Stefan Monnier
2013-06-05 19:34                                                                     ` Ted Zlatanov
2013-06-05 20:19                                                                       ` Stefan Monnier
2013-06-07  7:36                                                               ` Eli Zaretskii
2013-06-07  7:45                                                                 ` Jambunathan K
2013-06-07 12:48                                                                 ` Ted Zlatanov
2013-06-07 14:52                                                                   ` Eli Zaretskii
2013-06-07 15:39                                                                     ` Ted Zlatanov
2013-06-07 12:53                                                                 ` Kenichi Handa
2013-06-07 14:16                                                                   ` compose-region docstring update (was: using glyphs by default in perl-mode) Ted Zlatanov
2013-06-09 12:45                                                                     ` Kenichi Handa
     [not found]                                                                 ` <87li6m1i0m.fsf__1024.55602395839$1370591197$gmane$org@gmail.com>
2013-06-07 13:05                                                                   ` bug#13189: using glyphs by default in perl-mode Ted Zlatanov
2013-06-07 16:07                                                                     ` Stefan Monnier
2013-05-09 18:30                       ` Dan Nicolaescu
2013-05-10  0:23                     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87txlcxyab.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).