get rid of toolbar and scroll bar

This commit is contained in:
lxsameer 2011-01-02 19:48:32 +03:30
parent 219665b982
commit 535b0ff17e
2 changed files with 13 additions and 2 deletions

View File

@ -48,4 +48,8 @@
;; (define-key-after global-map [menu-bar file new-proj phpproj] (cons "PHP" (make-sparse-keymap "php-proj")) 'pyproj)
)
;; TODO: build a menu destructor
(defun menu/destruct-menu ()
"Remove Shit provided menu form emacs menus"
(global-unset-key [menu-bar file new-proj])
)

View File

@ -85,6 +85,9 @@ This mode provide a basic configuration for an IDE."
(let ()
;; before initiazing mode
(run-hooks shit-preinit-mode-hook)
;; i really found toolbar and scrollbar useless so i disabled them
(if tool-bar-mode (tool-bar-mode))
(if scroll-bar-mode (scroll-bar-mode))
(menu/init-menu)
;; after mode was initialized
(run-hooks shit-postinit-mode-hook)
@ -93,7 +96,11 @@ This mode provide a basic configuration for an IDE."
(let ()
;; before deactivating mode
(run-hooks shit-prerm-mode-hook)
;; return everything to normal
(if (not tool-bar-mode) (tool-bar-mode))
(if (not scroll-bar-mode) (scroll-bar-mode))
(menu/destruct-menu)
;; after deactivating mode
(run-hooks shit-postrm-mode-hook)
)