From 892129881dba9a923ab1ff3fe75283ee67a6c0c9 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 5 Mar 2018 15:58:57 -0500 Subject: [PATCH] Suppress some font-lock-fontify-buffer compiler warnings * lisp/htmlfontify.el (hfy-force-fontification): * lisp/progmodes/idlw-help.el (idlwave-help-fontify): Suppress compiler warning from backwards compatibility branch. --- lisp/htmlfontify.el | 5 +++-- lisp/progmodes/idlw-help.el | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 799da86cd44..23efcd1298a 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -1830,10 +1830,11 @@ fontified. This is a simple convenience wrapper around (noninteractive (message "hfy batch mode (%s:%S)" (or (buffer-file-name) (buffer-name)) major-mode) - (if (fboundp 'font-lock-ensure) + (if (fboundp 'font-lock-ensure) ; Emacs >= 25.1 (font-lock-ensure) (when font-lock-defaults - (font-lock-fontify-buffer)))) + ; Silence "interactive use only" warning on Emacs >= 25.1. + (with-no-warnings (font-lock-fontify-buffer))))) ((fboundp #'jit-lock-fontify-now) (message "hfy jit-lock mode (%S %S)" window-system major-mode) (jit-lock-fontify-now)) diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el index cbdca015e93..54e740be11f 100644 --- a/lisp/progmodes/idlw-help.el +++ b/lisp/progmodes/idlw-help.el @@ -1181,9 +1181,10 @@ Useful when source code is displayed as help. See the option (with-syntax-table idlwave-mode-syntax-table (set (make-local-variable 'font-lock-defaults) idlwave-font-lock-defaults) - (if (fboundp 'font-lock-ensure) + (if (fboundp 'font-lock-ensure) ; Emacs >= 25.1 (font-lock-ensure) - (font-lock-fontify-buffer)))))) + ;; Silence "interactive use only" warning on Emacs >= 25.1. + (with-no-warnings (font-lock-fontify-buffer))))))) (defun idlwave-help-error (name type class keyword) -- 2.39.5