From 9e66d4299fcdac8ea7f2e929d4f10b9b31d9a2b4 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Wed, 6 Oct 1999 17:06:41 +0000 Subject: after-change-functions only changed locally, only for script buffers. --- generic/proof-toolbar.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/generic/proof-toolbar.el b/generic/proof-toolbar.el index d294c053..c78f430c 100644 --- a/generic/proof-toolbar.el +++ b/generic/proof-toolbar.el @@ -189,8 +189,11 @@ to the default toolbar." (set-specifier default-toolbar proof-toolbar (current-buffer)) ;; Set the callback for updating the enablers (add-hook 'proof-state-change-hook 'proof-toolbar-refresh) - ;; A rather pervasive hook - (add-hook 'after-change-functions 'proof-toolbar-refresh) + ;; Also call it whenever text changes in this buffer, + ;; provided it's a script buffer. + (if (eq proof-buffer-type 'script) + (add-hook 'after-change-functions + 'proof-toolbar-refresh nil t)) ;; And the interval timer for really refreshing the toolbar (setq proof-toolbar-itimer (start-itimer "proof toolbar refresh" -- cgit v1.2.3