diff options
Diffstat (limited to 'lisp/tool-bar.el')
-rw-r--r-- | lisp/tool-bar.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el index be552854b1..023b90af5d 100644 --- a/lisp/tool-bar.el +++ b/lisp/tool-bar.el @@ -62,6 +62,16 @@ conveniently adding tool bar items." (tool-bar-setup)))) ;;;###autoload +;; Used in the Show/Hide menu, to have the toggle reflect the current frame. +(defun toggle-tool-bar-mode-from-frame (&optional arg) + "Toggle tool bar on or off, based on the status of the current frame. +See `tool-bar-mode' for more information." + (interactive (list (or current-prefix-arg 'toggle))) + (if (eq arg 'toggle) + (tool-bar-mode (if (> (frame-parameter nil 'tool-bar-lines) 0) 0 1)) + (tool-bar-mode arg))) + +;;;###autoload ;; We want to pretend the toolbar by standard is on, as this will make ;; customize consider disabling the toolbar a customization, and save ;; that. We could do this for real by setting :init-value above, but |