Commit 2649105a authored by Tassilo Horn's avatar Tassilo Horn

Use add-function for prettify-symbols-compose-predicate

* lisp/textmodes/tex-mode.el (tex-common-initialization): Set
prettify-symbols-compose-predicate in terms of add-function.

* etc/NEWS: Mention prettify-symbols-compose-predicate and
prettify-symbols-mode support in tex-mode.
parent 74881b6e
......@@ -301,6 +301,13 @@ standards.
** Prog mode has some support for multi-mode indentation.
See `prog-indentation-context' and `prog-widen'.
** Prettify Symbols mode supports custom composition predicates. By
overriding the default `prettify-symbols-compose-predicate', modes can
specify in which contexts a symbol map be composed to some unicode
character. `prettify-symbols-default-compose-p' is the default which
is suitable for most programming languages such as C or Lisp (but not
** New `xterm-screen-extra-capabilities' config.
** The `save-place' variable is replaced by a `save-place-mode'.
......@@ -694,6 +701,10 @@ name patterns (e.x. all "FOR_DOXYGEN_ONLY_*") to be excluded.
*** New custom variable `tex-print-file-extension' to help users who
use PDF instead of DVI.
*** TeX mode now supports Prettify Symbols mode. When enabling
`prettify-symbols-mode' in a tex-mode buffer, \alpha ... \omega, and
many other math macros are displayed using unicode characters.
** whitespace-mode: new 'big-indent style highlighting too much indentation.
By default, 32 spaces and four TABs are considered to be too much but
`whitespace-big-indent-regexp' can be configured to change that.
......@@ -1256,7 +1256,8 @@ Entering SliTeX mode runs the hook `text-mode-hook', then the hook
. tex-font-lock-unfontify-region)))
(setq-local prettify-symbols-alist tex--prettify-symbols-alist)
(setq-local prettify-symbols-compose-predicate #'tex--prettify-symbols-compose-p)
(add-function :override (local 'prettify-symbols-compose-predicate)
(setq-local syntax-propertize-function
(syntax-propertize-rules latex-syntax-propertize-rules))
;; TABs in verbatim environments don't do what you think.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment