56 lines
1.7 KiB
Plaintext
56 lines
1.7 KiB
Plaintext
;;;;
|
|
;;;; S c h e m e - t e x t . s t k l o s -- A mini font-lock package
|
|
;;;;
|
|
;;;; Copyright © 1997-1998 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
|
|
;;;;
|
|
;;;; Permission to use, copy, and/or distribute this software and its
|
|
;;;; documentation for any purpose and without fee is hereby granted, provided
|
|
;;;; that both the above copyright notice and this permission notice appear in
|
|
;;;; all copies and derived works. Fees for distribution or use of this
|
|
;;;; software or derived works may only be charged with express written
|
|
;;;; permission of the copyright holder.
|
|
;;;; This software is provided ``as is'' without express or implied warranty.
|
|
;;;;
|
|
;;;; $Id: Schemetext.stklos 1.2 Mon, 28 Dec 1998 23:05:11 +0100 eg $
|
|
;;;;
|
|
;;;; Author: Erick Gallesio [eg@unice.fr]
|
|
;;;; Creation date: 16-Jan-1997 12:10
|
|
;;;; Last file update: 27-Dec-1998 12:07
|
|
|
|
(require "Tk-classes")
|
|
(require "font-lock")
|
|
|
|
(select-module STklos+Tk)
|
|
|
|
;;;;
|
|
;;;; Resources
|
|
;;;;
|
|
|
|
(option 'add "*SchemeText*Text*Background" "white" "widgetDefault")
|
|
|
|
;=============================================================================
|
|
;
|
|
; < S c h e m e - T e x t >
|
|
;
|
|
;=============================================================================
|
|
(option 'add "*SchemeText*Text*Background" "white" "widgetDefault")
|
|
|
|
(define-class <Scheme-Text> (<Scroll-Text>)
|
|
((class :init-keyword :class
|
|
:init-form "SchemeText")))
|
|
|
|
(define-method initialize ((self <Scheme-text>) initargs)
|
|
(next-method)
|
|
(make-fontifiable (Id self))
|
|
(fontify-whole-buffer (Id self)))
|
|
|
|
#|
|
|
Usage:
|
|
(define t (make <Scheme-Text>
|
|
:value "(define A (make <B> :key \"aa\")); comment"))
|
|
(pack t :fill "both" :expand #t)
|
|
|
|
|#
|
|
|
|
|