From 8c8583991007aa3a1831310be5d637104a918a43 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Fri, 17 Jun 2016 18:54:35 +0200 Subject: Be in good terms with haskell-mode Avoid redefining font-lock-ensure, so that haskell-mode doesn't get mad at us. Should close github's #164. --- elisp/geiser-base.el | 8 -------- elisp/geiser-syntax.el | 5 +++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/elisp/geiser-base.el b/elisp/geiser-base.el index ee30770..aefff5f 100644 --- a/elisp/geiser-base.el +++ b/elisp/geiser-base.el @@ -27,14 +27,6 @@ (let ((inhibit-changing-match-data t)) (looking-at regexp)))) -(when (not (fboundp 'font-lock-ensure)) - (defun font-lock-ensure (&optional beg end) - (with-no-warnings (font-lock-fontify-region (or beg (point-min)) - (or end (point-max)))))) - -(when (not (fboundp 'font-lock-flush)) - (defun font-lock-flush (&optional beg end))) - ;;; Utilities: (defsubst geiser--chomp (str) diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el index 1b4364b..64b366f 100644 --- a/elisp/geiser-syntax.el +++ b/elisp/geiser-syntax.el @@ -491,8 +491,9 @@ implementation-specific entries for font-lock-keywords.") (let ((font-lock-verbose nil) (beg (or beg (point-min))) (end (or end (point-max)))) - (font-lock-flush beg end) - (font-lock-ensure beg end))) + (if (fboundp 'font-lock-flush) + (font-lock-flush beg end) + (with-no-warnings (font-lock-fontify-region beg end))))) (defun geiser-syntax--scheme-str (str) (save-current-buffer -- cgit v1.2.3