emacs-devel
[Top][All Lists]
Advanced

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

Interface of prog-prettification


From: Juanma Barranquero
Subject: Interface of prog-prettification
Date: Sun, 16 Jun 2013 03:56:12 +0200

A few questions about the new prog-prettification.

- prog--prettify-font-lock-compose-symbol's docstring says:
  "Compose a sequence of ascii chars into a symbol."

It is really true that it must be a sequence of ASCII characters? Why?

- Docstring of prog-prettify-symbols says:
  "When set to an alist in the form `((STRING . CHARACTER)...)'"

But in fact, instead of CHARACTER you can use a string, and its
characters will be "composed" (stacked) together.

- I don't fully understand how the user is supposed to extend the
default modes' prog-prettification. What is the expected interface?
Customizing prog-prettify-symbols sets the value for all prog-derived
modes, but what if I want to use different prettifications for
different modes?

I tried adding (set (make-local-variable 'prog-prettify-symbols)
'(("my-symbol" . ?MYCHAR))) to the relevant mode-hook, but that does
not work.

pushing '("my-symbol" . ?MYCHAR) to the corresponding mode-specific
alist (lisp--prettify-symbols-alist,
cfengine3--prettify-symbols-alist, perl--prettify-symbols-alist, etc.)
works, but on one hand, these are internal, non-documented constants;
on the other hand, that does not help to separate lisp-mode from
emacs-lisp-mode, which are initialized from the same alist.

   Juanma



reply via email to

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