[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Uncertain prettification
From: |
Tassilo Horn |
Subject: |
Re: Uncertain prettification |
Date: |
Sat, 09 Apr 2022 17:57:14 +0200 |
User-agent: |
mu4e 1.7.12; emacs 29.0.50 |
Ikumi Keita <ikumi@ikumi.que.jp> writes:
Hi Keita,
> ----------------------------------------------------------------------
> (when (and (boundp 'tex--prettify-symbols-alist)
> (boundp 'prettify-symbols-compose-predicate))
> (defun TeX--prettify-symbols-compose-p (start end match)
> [...]
> (defun VirTeX-common-initialization ()
> [...]
> ;; Prettify Symbols mode
> (when (fboundp 'TeX--prettify-symbols-compose-p)
> (set (make-local-variable 'prettify-symbols-alist)
> tex--prettify-symbols-alist)
> [...]
> ----------------------------------------------------------------------
>
> [snip]
>
> The simplest solution is to add "(require 'tex-mode)" in tex.el. See
> the patch at the last of this message.
>
> This, however, increases byte compilation time, in particular for
> "make dynvars-check"[1]. I think it's acceptable, but what do others
> think about this issue?
For me its 220 vs. 233 seconds which is totally acceptable. Another way
would be to bump the required Emacs version to 25.1 where we could omit
all (f)boundp-checks. Or as a third option, we could only check
(fboundp 'prettify-symbols-default-compose-p)
which is always defined (even directly after emacs -Q) and available
from 25.1 on where we can assume that prettify-symbols-compose-predicate
and tex--prettify-symbols-alist are also available. And then we can
defer loading tex-mode in VirTeX-common-initialization.
Bye,
Tassilo