From 2346238d0a2ea1769bc0eb6b6913a5bb8516cb3c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 24 Jan 1996 05:40:21 +0000 Subject: [PATCH] (turn-on-font-lock): Test window-system. --- lisp/font-lock.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 8121b406979..ff0ede34e6e 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -411,8 +411,9 @@ syntactic change on other lines, you can use \\[font-lock-fontify-window]." ;;;###autoload (defun turn-on-font-lock () - "Unconditionally turn on Font Lock mode." - (font-lock-mode 1)) + "Turn on Font Lock mode, if the terminal can display it." + (if window-system + (font-lock-mode 1))) ;;;###autoload (defun font-lock-fontify-buffer () -- 2.39.2