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

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

[elpa] master 26fe946 147/433: (mmm-set-font-lock-defaults): Added compa


From: Dmitry Gutov
Subject: [elpa] master 26fe946 147/433: (mmm-set-font-lock-defaults): Added compatibility wrapper function.
Date: Thu, 15 Mar 2018 19:43:52 -0400 (EDT)

branch: master
commit 26fe9465498ccecad219360f63b00f3d60dd1201
Author: mas <mas>
Commit: mas <mas>

    (mmm-set-font-lock-defaults): Added compatibility wrapper function.
---
 mmm-compat.el | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/mmm-compat.el b/mmm-compat.el
index 3acaefa..7b9417a 100644
--- a/mmm-compat.el
+++ b/mmm-compat.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2000 by Michael Abraham Shulman
 
 ;; Author: Michael Abraham Shulman <address@hidden>
-;; Version: $Id: mmm-compat.el,v 1.5 2000/07/21 17:08:10 mas Exp $
+;; Version: $Id: mmm-compat.el,v 1.6 2000/08/02 23:24:13 mas Exp $
 
 ;;{{{ GPL
 
@@ -166,13 +166,27 @@ This text should not be modified."
        (current-buffer))))
 
 ;;}}}
-;;{{{ Font Lock (Emacs w/o X)
+;;{{{ Font Lock Available (Emacs w/o X)
 
 (defvar mmm-font-lock-available-p (or window-system mmm-xemacs)
   "Whether font-locking is available.
 Emacs 19 and 20 only provide font-lock with a window system in use.")
 
 ;;}}}
+;;{{{ Font Lock Defaults (XEmacs)
+
+(defun mmm-set-font-lock-defaults ()
+  "Set font-lock defaults without trying to turn font-lock on.
+In XEmacs, `font-lock-set-defaults' calls `font-lock-set-defaults-1'
+to do the real work but then `turn-on-font-lock', which in turn calls
+`font-lock-mode', which unsets the defaults if running in a hidden
+buffer \(name begins with a space).  So in XEmacs, we just call
+`font-lock-set-defaults-1' directly."
+  (if mmm-xemacs
+      (font-lock-set-defaults-1)
+    (font-lock-set-defaults)))
+
+;;}}}
 
 (provide 'mmm-compat)
 



reply via email to

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