From: Teemu Likonen <tlikonen@iki.fi>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
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 [thread overview]
Message-ID: <874mdkltjk.fsf@iki.fi> (raw)
In-Reply-To: <jwvk2mqwpa6.fsf-monnier+emacsdiffs@gnu.org> (Stefan Monnier's message of "Sat, 30 Jan 2016 19:45:23 -0500")
[-- Attachment #1: Type: text/plain, Size: 906 bytes --]
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))))
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
next prev parent reply other threads:[~2016-02-07 10:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160130182614.10459.39544@vcs.savannah.gnu.org>
[not found] ` <E1aPaDu-0002jJ-Ei@vcs.savannah.gnu.org>
2016-01-31 0:45 ` [elpa] master 19862ff: Use font-lock-fontify-region instead of jit-lock-fontify-now Stefan Monnier
2016-02-07 10:10 ` Teemu Likonen [this message]
2016-02-07 10:56 ` Teemu Likonen
2016-02-08 3:09 ` Stefan Monnier
2016-02-08 19:24 ` Teemu Likonen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874mdkltjk.fsf@iki.fi \
--to=tlikonen@iki.fi \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.