aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/menu-bar.el20
2 files changed, 21 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 868d9822b85..d61c11b4ef5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12010-08-13 Jan Djärv <jan.h.d@swipnet.se>
2
3 * menu-bar.el (menu-bar-set-tool-bar-position): New function.
4 (menu-bar-showhide-tool-bar-menu-customize-enable-left)
5 (menu-bar-showhide-tool-bar-menu-customize-enable-right)
6 (menu-bar-showhide-tool-bar-menu-customize-enable-top)
7 (menu-bar-showhide-tool-bar-menu-customize-enable-bottom): Call
8 menu-bar-set-tool-bar-position.
9
12010-08-12 Stefan Monnier <monnier@iro.umontreal.ca> 102010-08-12 Stefan Monnier <monnier@iro.umontreal.ca>
2 11
3 * progmodes/octave-mod.el (octave-mode-syntax-table): Use the new "c" 12 * progmodes/octave-mod.el (octave-mode-syntax-table): Use the new "c"
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 626472605ff..3c1241237f1 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -968,6 +968,14 @@ mail status in mode line"))
968 :help ,(purecopy "Turn menu-bar on/off") 968 :help ,(purecopy "Turn menu-bar on/off")
969 :button (:toggle . (> (frame-parameter nil 'menu-bar-lines) 0)))) 969 :button (:toggle . (> (frame-parameter nil 'menu-bar-lines) 0))))
970 970
971(defun menu-bar-set-tool-bar-position (position)
972 (customize-set-variable 'tool-bar-mode t)
973 (set-frame-parameter nil 'tool-bar-position position)
974 (customize-set-variable 'default-frame-alist
975 (cons (cons 'tool-bar-position position)
976 (assq-delete-all 'tool-bar-position
977 default-frame-alist))))
978
971(defun menu-bar-showhide-tool-bar-menu-customize-disable () 979(defun menu-bar-showhide-tool-bar-menu-customize-disable ()
972 "Do not display tool bars." 980 "Do not display tool bars."
973 (interactive) 981 (interactive)
@@ -975,24 +983,20 @@ mail status in mode line"))
975(defun menu-bar-showhide-tool-bar-menu-customize-enable-left () 983(defun menu-bar-showhide-tool-bar-menu-customize-enable-left ()
976 "Display tool bars on the left side." 984 "Display tool bars on the left side."
977 (interactive) 985 (interactive)
978 (customize-set-variable 'tool-bar-mode t) 986 (menu-bar-set-tool-bar-position 'left))
979 (set-frame-parameter nil 'tool-bar-position 'left))
980 987
981(defun menu-bar-showhide-tool-bar-menu-customize-enable-right () 988(defun menu-bar-showhide-tool-bar-menu-customize-enable-right ()
982 "Display tool bars on the right side." 989 "Display tool bars on the right side."
983 (interactive) 990 (interactive)
984 (customize-set-variable 'tool-bar-mode t) 991 (menu-bar-set-tool-bar-position 'right))
985 (set-frame-parameter nil 'tool-bar-position 'right))
986(defun menu-bar-showhide-tool-bar-menu-customize-enable-top () 992(defun menu-bar-showhide-tool-bar-menu-customize-enable-top ()
987 "Display tool bars on the top side." 993 "Display tool bars on the top side."
988 (interactive) 994 (interactive)
989 (customize-set-variable 'tool-bar-mode t) 995 (menu-bar-set-tool-bar-position 'top))
990 (set-frame-parameter nil 'tool-bar-position 'top))
991(defun menu-bar-showhide-tool-bar-menu-customize-enable-bottom () 996(defun menu-bar-showhide-tool-bar-menu-customize-enable-bottom ()
992 "Display tool bars on the bottom side." 997 "Display tool bars on the bottom side."
993 (interactive) 998 (interactive)
994 (customize-set-variable 'tool-bar-mode t) 999 (menu-bar-set-tool-bar-position 'bottom))
995 (set-frame-parameter nil 'tool-bar-position 'bottom))
996 1000
997(if (featurep 'move-toolbar) 1001(if (featurep 'move-toolbar)
998 (progn 1002 (progn