aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--generic/proof-toolbar.el7
1 files 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"