On Mon, 03 Jun 2013 03:04:41 -0400 Stefan Monnier wrote: SM> Please use prog-mode.el rather than prog.el. >> +(defconst perl--prettify-symbols-alist-basic >> + '(("->" . ?→) >> + ("=>" . ?⇒) >> + ("::" . ?∷))) SM> I don't think "basic" and "extended" make much sense currently, so the SM> basic user setting should be a boolean. Major modes should simply SM> provide *the* alist that makes sense for them. OK. >> +(defconst perl--prettify-symbols-alist-extended >> + `(,@perl--prettify-symbols-alist-basic >> + ("andalso" . ?∧) ("orelse" . ?∨) ("as" . ?≡)("not" . ?¬) >> + ("div" . ?÷) ("*" . ?×) ("o" . ?○) >> + ("<-" . ?←) ("<>" . ?≠) (">=" . ?≥) ("<=" . ?≤) ("..." . ?⋯))) SM> E.g. this makes very little sense for Perl, since these mapping all come SM> from sml-mode.el ;-) Yeah, I didn't pay attention. OK. >> +;; used to add font-lock keywords dynamically >> +(defvar perl-augmented-font-lock-keywords) >> +(defvar perl-augmented-font-lock-keywords-1) >> +(defvar perl-augmented-font-lock-keywords-2) SM> This smells internal, so please use "--" in their name. OK. >> + (set (make-local-variable 'prog-prettify-symbols-alist) nil) SM> Just make the default value be nil instead. OK. >> +(defcustom prog-prettify-symbols nil >> + "Which symbols should be prettified. >> +When set to `basic' or `extended' or `all', the actual choices >> +are made by the mode that derives from `prog-mode'." >> + :type '(choice >> + (const :tag "No thanks" nil) >> + (const :tag "Basic list" basic) >> + (const :tag "Extended list: basic plus much more" extended) >> + (const :tag "Everything: because you can!" all) >> + (alist :tag "Define your own list" :key-type string :value-type character)) >> + :group 'languages) SM> Make it into a boolean. SM> Other than that, looks good, please install. Please take a final look. I added this to emacs-lisp-mode (just lambda), perl-mode, and cfengine3-mode. It's easy to do this once you start doing it but it still feels like an annoying amount of work. It also feels like it should support arbitrary strings (to compose Unicode) and even images. WDYT? Too much? I couldn't move the code to prog-mode.el. The emacs-lisp-mode include needs the prog-mode map and barfed all over. Sorry. But it should be OK otherwise. Ted