LOAD-FIND-FILE-INITIALIZATION must be re-run when the buffer's
authorChris Hanson <org/chris-hanson/cph>
Thu, 7 Jun 2001 17:45:01 +0000 (17:45 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 7 Jun 2001 17:45:01 +0000 (17:45 +0000)
pathname or major mode is changed.

v7/src/edwin/filcom.scm

index 4a204a48e08c15a7a581eb7d5e45828319fafb00..7122b06ac218e849bd9fa9e00ce2a3ad751a130f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: filcom.scm,v 1.218 2001/06/02 21:57:16 cph Exp $
+;;; $Id: filcom.scm,v 1.219 2001/06/07 17:45:01 cph Exp $
 ;;;
 ;;; Copyright (c) 1986, 1989-2001 Massachusetts Institute of Technology
 ;;;
@@ -191,6 +191,14 @@ procedures are called."
           (or (not b)
               (> a b))))))
 
+(let ((procedure
+       (lambda (buffer)
+        (let ((pathname (buffer-pathname buffer)))
+          (if pathname
+              (load-find-file-initialization buffer pathname))))))
+  (add-event-receiver! event:set-buffer-pathname procedure)
+  (add-event-receiver! event:set-buffer-major-mode procedure))
+
 (define (load-find-file-initialization buffer pathname)
   (let ((pathname
         (catch-file-errors