From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.devel 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 Message-ID: <874mdkltjk.fsf@iki.fi> References: <20160130182614.10459.39544@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1454839904 30442 80.91.229.3 (7 Feb 2016 10:11:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Feb 2016 10:11:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 07 11:11:31 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aSMJT-0000Ed-Ph for ged-emacs-devel@m.gmane.org; Sun, 07 Feb 2016 11:11:27 +0100 Original-Received: from localhost ([::1]:33007 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSMJT-0004X8-0U for ged-emacs-devel@m.gmane.org; Sun, 07 Feb 2016 05:11:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSMJD-0004Wz-5q for emacs-devel@gnu.org; Sun, 07 Feb 2016 05:11:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSMJA-0002Ww-0Q for emacs-devel@gnu.org; Sun, 07 Feb 2016 05:11:11 -0500 Original-Received: from mta-out1.inet.fi ([62.71.2.198]:53657 helo=johanna1.inet.fi) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSMJ9-0002WT-Lz for emacs-devel@gnu.org; Sun, 07 Feb 2016 05:11:07 -0500 RazorGate-KAS: Status: not_detected RazorGate-KAS: Rate: 0 RazorGate-KAS: Envelope from: RazorGate-KAS: Version: 5.5.3 RazorGate-KAS: LuaCore: 80 2014-11-10_18-01-23 260f8afb9361da3c7edfd3a8e3a4ca908191ad29 RazorGate-KAS: Lua profiles 69136 [Nov 12 2014] RazorGate-KAS: Method: none Original-Received: from mithlond.arda (84.251.143.106) by johanna1.inet.fi (9.0.002.03-2-gbe5d057) id 56ACC4AE008CE234; Sun, 7 Feb 2016 12:10:58 +0200 Original-Received: from dtw by mithlond.arda with local (Exim 4.84) (envelope-from ) id 1aSMJ0-0004BZ-4Q; Sun, 07 Feb 2016 12:10:58 +0200 In-Reply-To: (Stefan Monnier's message of "Sat, 30 Jan 2016 19:45:23 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 62.71.2.198 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:199439 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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)))) >=20=20 > 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)))) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWtxgxAAoJEHGdadMkU5RQ+/MP/0aA3w6WoIGM1zSrGiF/8eBL G/e2EJBE/GIjsFkAgBQKkYQyvoMEOgb0D4khpeG4Ug4W9M2m5k8i2o1th2K3jK36 KJNrUf1GFSNygJG92ljWEGllZpnglw+5YTJyV2OEbSd6xoPtsfo2unw4LO2GNqhY 2azTMWYxVaPeDoMDQWv9fSgrndq+KSuN/IhidCaOG/MJnHNq3dZhWFVEq6gMS7Bh q/HHQoLPdGl3rCq8tYrfwPzI1r7UZo1Pb028BVGVaHpGnnCdQ8ft0lFmRL1qSKyE Qc65X+lBAFpt2tPavYOz+mZvF/BSnrgAyc2/iFQm2VJuT9oZtiIApQnoLakXTe2M zPiqdCLE1Y/nr/c/CW3G1I1klDbKR7yd93NMsR1/EY2WqxZWoJE8RDyuZczZuXtv C0TWKuZCQMymGnWFXUebn1kOseFNmy9JfzbtgVIjiVjnj//L41C9Ht6ZSVzOAWwv V/LP7mMMQDfx1TusgJqpdjoFfx/W2sTCSSCyS36rNWFETgjs7NARG12F5XzKz+YU ijolYteNLJmiDskLfXLaXEJoUukkgyaiymnHaVHQCLpDNaESkJxPjUc98jlwvGwT fmWnAuXUzJ//lWrIheOa7p0sBbMP6bXH0rf/7t3kgPgPkNh08/4r4Nd6cpo7zbWH p/1DMfk6v+o82jgqum45 =e/iU -----END PGP SIGNATURE----- --=-=-=--