comparison .elisp/settings/50.preferences.el @ 221:6aad20d9fcb0

emacs gui: move gui initialization code to a function Given the weirdness observed in gui init with daemon mode, this should make life with daemon mode easier.
author Augie Fackler <durin42@gmail.com>
date Tue, 07 Sep 2010 19:33:23 -0500
parents e4842709368a
children e742cf5a748c
comparison
equal deleted inserted replaced
220:07c671c9610c 221:6aad20d9fcb0
27 27
28 ;; no toolbar 28 ;; no toolbar
29 (setq tool-bar-mode nil) 29 (setq tool-bar-mode nil)
30 (tool-bar-mode 0) 30 (tool-bar-mode 0)
31 31
32 ;; scrollbars, but on the right, not the left
33 (set-scroll-bar-mode 'right)
34
35 ;; Command is meta in OS X.
36 (setq ns-command-modifier (quote meta))
37
38 ;; Don't popup new frames for opened files
39 (setq ns-pop-up-frames nil)
40
41 ; cause imenu to always rescan the buffer (for textmate-goto-symbol) 32 ; cause imenu to always rescan the buffer (for textmate-goto-symbol)
42 (setq imenu-auto-rescan t) 33 (setq imenu-auto-rescan t)
43 ;; better uniquify from http://metapundit.net/sections/blog/emacs_and_django 34 ;; better uniquify from http://metapundit.net/sections/blog/emacs_and_django
44 (require 'uniquify) 35 (require 'uniquify)
45 (setq uniquify-buffer-name-style 'reverse) 36 (setq uniquify-buffer-name-style 'reverse)
46 (setq uniquify-separator "/") 37 (setq uniquify-separator "/")
47 (setq uniquify-after-kill-buffer-p t) 38 (setq uniquify-after-kill-buffer-p t)
48 (setq uniquify-ignore-buffers-re "^\\*") 39 (setq uniquify-ignore-buffers-re "^\\*")
49 (setq hg-outgoing-repository "") 40 (setq hg-outgoing-repository "")
50 (setq hg-incoming-repository "") 41 (setq hg-incoming-repository "")
51 ; so that Cmd+H won't activate Hide Current
52 ; App and Cmd+Shift+q won't logout user.
53 (setq mac-pass-command-to-system nil)
54 42
55 (cond 43 ;; Make this a function in case we have to re-run it. I've had weirdness
56 ((eq window-system 'ns) ;; OS X 44 ;; ensue with daemon mode not always initializing everything the way I want
57 (set-face-attribute 'default nil :height 120)) 45 ;; in new frames.
58 (t ;; everywhere else 46 (defun af-gui-init ()
59 (set-face-attribute 'default nil :height 100))) 47 (interactive)
48 ;; so that Cmd+H won't activate Hide Current
49 ;; App and Cmd+Shift+q won't logout user.
50 (setq mac-pass-command-to-system nil)
60 51
52 ;; scrollbars, but on the right, not the left
53 (if (window-system) (set-scroll-bar-mode 'right))
54
55 ;; Command is meta in OS X.
56 (setq ns-command-modifier (quote meta))
57
58 ;; Don't popup new frames for opened files
59 (setq ns-pop-up-frames nil)
60
61 (cond
62 ((eq window-system 'ns) ;; OS X
63 (set-face-attribute 'default nil :height 120))
64 (t ;; everywhere else
65 (set-face-attribute 'default nil :height 100)))
66 )
67 (af-gui-init)
61 ;; use y or n instead of yes or no 68 ;; use y or n instead of yes or no
62 (fset 'yes-or-no-p 'y-or-n-p) 69 (fset 'yes-or-no-p 'y-or-n-p)
63 70
64 ;; whitespace detection 71 ;; whitespace detection
65 (setq whitespace-style '(trailing tabs lines-tail indentation trailing empty)) 72 (setq whitespace-style '(trailing tabs lines-tail indentation trailing empty))