[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using glyphs by default in perl-mode
From: |
Stefan Monnier |
Subject: |
Re: using glyphs by default in perl-mode |
Date: |
Mon, 03 Jun 2013 03:04:41 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Please use prog-mode.el rather than prog.el.
> +(defconst perl--prettify-symbols-alist-basic
> + '(("->" . ?→)
> + ("=>" . ?⇒)
> + ("::" . ?∷)))
I don't think "basic" and "extended" make much sense currently, so the
basic user setting should be a boolean. Major modes should simply
provide *the* alist that makes sense for them.
> +(defconst perl--prettify-symbols-alist-extended
> + `(,@perl--prettify-symbols-alist-basic
> + ("andalso" . ?∧) ("orelse" . ?∨) ("as" . ?≡)("not" . ?¬)
> + ("div" . ?÷) ("*" . ?×) ("o" . ?○)
> + ("<-" . ?←) ("<>" . ?≠) (">=" . ?≥) ("<=" . ?≤) ("..." . ?⋯)))
E.g. this makes very little sense for Perl, since these mapping all come
from sml-mode.el ;-)
> +;; 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)
This smells internal, so please use "--" in their name.
> + (set (make-local-variable 'prog-prettify-symbols-alist) nil)
Just make the default value be nil instead.
> +(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)
Make it into a boolean.
Other than that, looks good, please install.
Stefan
- Re: using glyphs by default in perl-mode, Dan Nicolaescu, 2013/06/01
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/01
- Re: using glyphs by default in perl-mode, Stefan Monnier, 2013/06/01
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/02
- Re: using glyphs by default in perl-mode, Stefan Monnier, 2013/06/02
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/02
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/02
- Re: using glyphs by default in perl-mode,
Stefan Monnier <=
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/03
- Re: using glyphs by default in perl-mode, Davis Herring, 2013/06/04
- Re: using glyphs by default in perl-mode, Stefan Monnier, 2013/06/04
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/04
- Re: using glyphs by default in perl-mode, Stefan Monnier, 2013/06/04
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/05
- Re: using glyphs by default in perl-mode, Stefan Monnier, 2013/06/05
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/05
- Re: using glyphs by default in perl-mode, joakim, 2013/06/05
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/05