diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2009-09-09 00:21:59 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2009-09-09 00:21:59 +0000 |
commit | 42fadfd4d4de3fe4147e3fdd181240621d0d5176 (patch) | |
tree | 6645a7248e07e90f94aa5064a2843fe20a255904 /generic/proof-toolbar.el | |
parent | c446040803475a55760a192742cdb8a297e62df3 (diff) |
proof-toolbar-setup: do the right thing (map across all PG buffers)
Diffstat (limited to 'generic/proof-toolbar.el')
-rw-r--r-- | generic/proof-toolbar.el | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/generic/proof-toolbar.el b/generic/proof-toolbar.el index 2b31768b..876b8b93 100644 --- a/generic/proof-toolbar.el +++ b/generic/proof-toolbar.el @@ -90,9 +90,9 @@ ;;;###autoload (defun proof-toolbar-setup () - "Initialize Proof General toolbar and enable it for current buffer. -If `proof-toolbar-enable' is nil, change the current buffer toolbar -to the default toolbar." + "Initialize Proof General toolbar and enable it for all PG buffers. +If `proof-toolbar-enable' is nil, change the buffer toolbars +back the default toolbar." (interactive) (when (proof-toolbar-available-p) (unless proof-toolbar-map @@ -101,12 +101,15 @@ to the default toolbar." (mapc 'proof-toolbar-make-icon (proof-ass toolbar-entries)) (proof-toolbar-make-toolbar-items proof-toolbar-map (proof-ass toolbar-entries))) - (when proof-toolbar-enable - (set (make-local-variable 'tool-bar-map) proof-toolbar-map)) - (when (not proof-toolbar-enable) - (kill-local-variable 'tool-bar-map)))) + (proof-map-buffers + (append + (proof-buffers-in-mode proof-mode-for-script) + (proof-associated-buffers)) + (when proof-toolbar-enable + (set (make-local-variable 'tool-bar-map) proof-toolbar-map)) + (when (not proof-toolbar-enable) + (kill-local-variable 'tool-bar-map))))) -;; Action to take after altering option proof-toolbar-enable (defalias 'proof-toolbar-enable 'proof-toolbar-setup) ;;;###autoload (autoload 'proof-toolbar-toggle "proof-toolbar") |