branch: externals/matlab-mode
commit 3e1d826e3a4981c8c6fc2b051569abc03c191863
Author: John Ciolfi <john.ciolfi...@gmail.com>
Commit: John Ciolfi <john.ciolfi...@gmail.com>

    matlab.el: matlab--imenu-index optimization
    
    Add suggestion from Stefan Monnier.
    
    Use font-lock-ensure instead of font-lock-fontify-region because font-lock 
may have
    already been applied to most of the buffer.
---
 matlab.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/matlab.el b/matlab.el
index 04580a8282..ae3a222e34 100644
--- a/matlab.el
+++ b/matlab.el
@@ -209,7 +209,7 @@ locate the functions."
 
   ;; Handle case of font-lock being out of date.
   (font-lock-mode 1)
-  (font-lock-fontify-region (point-min) (point-max))
+  (font-lock-ensure (point-min) (point-max))
 
   (goto-char (point-min))
   (let (match

Reply via email to