On Sat, 01 Jun 2013 02:29:05 -0400 Dan Nicolaescu wrote: DN> Stefan Monnier writes: DN> Can you please disable this by default until it's done? It has negative DN> and annoying and very hard to remove effects... >>> Maintainers: OK to do this? I'll take care of the details. >> >> I'd rather we do it all in one go. It can't be that hard to add >> a config var to prog-mode and then use it in perl-mode. DN> The final result still is that the feature is off by default, right? DN> emacs cannot be used to edit perl in some configurations, so the faster DN> this ends the better. OK, so this only happens if font-lock decoration level more than 2 is requested: in perl-mode.el, we do #+begin_src lisp (setq font-lock-defaults '((perl-font-lock-keywords perl-font-lock-keywords-1 perl-font-lock-keywords-2) ... #+end_src The keywords-2 list is the one with the Unicode glyphs. So perhaps there should be a way to specify max font-lock decoration in terminal vs. graphical. Anyhow, just something I noticed... no big deal. The attached patch does the following: 1) move `perl--prettify-symbols-alist' and the functions for it, `perl--font-lock-compose-symbol' and `perl--font-lock-symbols-keywords' to simple.el (with the "prog-" prefix). 2) declare `perl-prettify-symbols' obsolete in favor of the alist `prog-prettify-symbols'. I gave `prog-prettify-symbols' two default choices: `prog--prettify-symbols-alist-basic' (just -> => ::) and `prog--prettify-symbols-alist-extended' (basic plus much more). It can also be a free-form alist with key=string, value=character. I expect programming modes will need to augment this list somehow, but I'd like the user to simply say "I want basics or extended" instead of having to select individual glyphs for every language. Maybe the choice should be between :basic and :extended as symbols? Ideas welcome. `prog-prettify-symbols' defaults to nil, so this feature is turned off by default. 3) tell `perl-mode' to use `prog--font-lock-symbols-keywords' instead of `perl--font-lock-symbols-keywords'. The patch grows simple.el. Perhaps it should live in prog.el or prettify.el. prog.el seems more sensible. I can't get `perl-mode' to show the symbols, so the patch is broken right now (I checked the data structures and they're OK; this is something in the font-lock plumbing I think). I also wonder if it's possible to add the prettify support at the `prog-mode' level, so each mode doesn't have to explicitly inline those keywords. Unfortunately my font-lock-fu is not good, so I'd really appreciate help with the last two issues. I spent a few hours on them but couldn't work them out. Thanks Ted