[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [elpa] master 19862ff: Use font-lock-fontify-region instead of jit-l
From: |
Teemu Likonen |
Subject: |
Re: [elpa] master 19862ff: Use font-lock-fontify-region instead of jit-lock-fontify-now |
Date: |
Sun, 07 Feb 2016 12:10:55 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.90 (gnu/linux) |
Stefan Monnier [2016-01-30 19:45:23-05] wrote:
>> - (jit-lock-fontify-now (min beg end) (max beg end))))
>> + (font-lock-fontify-region (min beg end) (max beg end))))
>
> Maybe even better would be to use font-lock-ensure (when available)?
It's unclear to me what's the difference between font-lock-ensure and
font-lock-fontify-region. It seems that font-lock-ensure is relatively
new, introduced in 24.4, so maybe not quite yet depend on it on an ELPA
package.
Are there established practices for writing a compatibility code in
situations like this? Perhaps calling a custom function
wcheck--fontify-region and having code like below?
(eval-when-compile
(if (fboundp 'font-lock-ensure)
(defalias 'wcheck--fontify-region 'font-lock-ensure)
(defun wcheck--fontify-region (beg end)
(font-lock-fontify-region beg end))))
signature.asc
Description: PGP signature
- Re: [elpa] master 19862ff: Use font-lock-fontify-region instead of jit-lock-fontify-now,
Teemu Likonen <=