emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/num3-mode 8a8924d 5/9: * packages/num3-mode/num3-mode.e


From: Stefan Monnier
Subject: [elpa] externals/num3-mode 8a8924d 5/9: * packages/num3-mode/num3-mode.el (num3-mode): Use font-lock-flush
Date: Sat, 28 Nov 2020 18:59:26 -0500 (EST)

branch: externals/num3-mode
commit 8a8924d27dd43c8b213accc6f273889cd2fe0cc6
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * packages/num3-mode/num3-mode.el (num3-mode): Use font-lock-flush
    if available.
---
 num3-mode.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/num3-mode.el b/num3-mode.el
index 4e4f625..5026cbe 100644
--- a/num3-mode.el
+++ b/num3-mode.el
@@ -1,6 +1,6 @@
 ;;; num3-mode.el --- highlight groups of digits in long numbers  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2012 Free Software Foundation, Inc.
+;; Copyright (C) 2012, 2014 Free Software Foundation, Inc.
 
 ;; Author: Felix Lee <felix8a@gmail.com>, Michal Nazarewicz <mina86@mina86.com>
 ;; Maintainer: Michal Nazarewicz <mina86@mina86.com>
@@ -91,8 +91,8 @@ where) decimal point (would be) is."
       (unless (assoc 'num3--matcher font-lock-keywords)
         (font-lock-add-keywords nil '(num3--matcher) 'append))
     (font-lock-remove-keywords nil '(num3--matcher)))
-  (when font-lock-mode
-    (font-lock-fontify-buffer)))
+  (if (fboundp 'font-lock-flush) (font-lock-flush)
+    (when font-lock-mode (font-lock-fontify-buffer))))
 
 ;;;###autoload
 (define-globalized-minor-mode global-num3-mode num3-mode num3-mode)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]