# HG changeset patch # User Jeff Hammel # Date 1450211554 28800 # Node ID d0b975ffabdf4c5218ced5fedcc01ff199bbfcfa # Parent f632a9850bb8f1d386e150556247eac4182223be http://serverfault.com/questions/132055/how-to-check-if-emacs-is-in-gui-mode-and-execute-tool-bar-mode-only-then diff -r f632a9850bb8 -r d0b975ffabdf .emacs --- a/.emacs Wed Sep 16 15:09:19 2015 -0700 +++ b/.emacs Tue Dec 15 12:32:34 2015 -0800 @@ -30,7 +30,9 @@ (menu-bar-mode (if window-system 1 -1)) ;; no need for a tool bar -(if (boundp 'tool-bar-mode) (tool-bar-mode 0)) +;; http://serverfault.com/questions/132055/how-to-check-if-emacs-is-in-gui-mode-and-execute-tool-bar-mode-only-then +(if window-system + (if (boundp 'tool-bar-mode) (tool-bar-mode 0))) ;; ...or a startup message ;; instead, it'd be nice to start with a list of recent files (recentf)