From a4792fcd406fde537aa7ec8eeacd97a64c0f6661 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Sun, 27 Jun 1999 17:37:10 +0200 Subject: [PATCH] More compatibility fixes (XEmacs and GNU Emacs has completely different ways of initializing font lock defaults). Rev: lib/tools/pike.el:1.3 --- lib/tools/pike.el | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/tools/pike.el b/lib/tools/pike.el index 96918f2538..e44a942587 100644 --- a/lib/tools/pike.el +++ b/lib/tools/pike.el @@ -1,5 +1,5 @@ ;;; pike.el -- Major mode for editing Pike and other LPC files. -;;; $Id: pike.el,v 1.2 1999/06/27 15:15:42 mast Exp $ +;;; $Id: pike.el,v 1.3 1999/06/27 15:37:10 mast Exp $ ;;; Copyright (C) 1995, 1996, 1997, 1998, 1999 Per Hedbor. ;;; This file is distributed as GPL @@ -298,8 +298,17 @@ The name is assumed to begin with a capital letter.") (goto-char (match-end 2))) ; non-nil (error t))))) - -(if (not (assq 'pike-mode font-lock-defaults-alist)) +;; XEmacs way. +(put 'pike-mode 'font-lock-defaults + '((pike-font-lock-keywords + pike-font-lock-keywords-1 pike-font-lock-keywords-2 + pike-font-lock-keywords-3) + nil nil ((?_ . "w")) beginning-of-defun + (font-lock-mark-block-function . mark-defun))) + +;; GNU Emacs way. +(if (and (boundp 'font-lock-defaults-alist) + (not (assq 'pike-mode font-lock-defaults-alist))) (setq font-lock-defaults-alist (cons (cons 'pike-mode -- GitLab