Add new event EVENT:SET-BUFFER-MAJOR-MODE.
authorChris Hanson <org/chris-hanson/cph>
Thu, 7 Jun 2001 17:43:21 +0000 (17:43 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 7 Jun 2001 17:43:21 +0000 (17:43 +0000)
v7/src/edwin/buffer.scm

index 4cd865f3c1d791c18bf326909dc491b7b22bcd02..db40b31b45a7b1e468317dcc90b0383f35df76eb 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: buffer.scm,v 1.181 2001/05/24 19:18:57 cph Exp $
+;;; $Id: buffer.scm,v 1.182 2001/06/07 17:43:21 cph Exp $
 ;;;
 ;;; Copyright (c) 1986, 1989-2001 Massachusetts Institute of Technology
 ;;;
@@ -497,7 +497,11 @@ The buffer is guaranteed to be deselected at that time."
   (set-variable-local-value! buffer
                             (ref-variable-object mode-name)
                             (mode-display-name mode))
-  ((mode-initialization mode) buffer))
+  ((mode-initialization mode) buffer)
+  (event-distributor/invoke! event:set-buffer-major-mode buffer))
+
+(define event:set-buffer-major-mode
+  (make-event-distributor))
 
 (define (buffer-minor-modes buffer)
   (list-copy (cdr (buffer-modes buffer))))