emacs.el
changeset 10 eb4d42b61a62
parent 9 c72d0d9f61cb
child 11 b2593783458d
equal deleted inserted replaced
9:c72d0d9f61cb 10:eb4d42b61a62
    26 (show-paren-mode t)                                                   ; show matching paren
    26 (show-paren-mode t)                                                   ; show matching paren
    27 (transient-mark-mode t)                                               ; show highlighting
    27 (transient-mark-mode t)                                               ; show highlighting
    28 (global-font-lock-mode t)                                             ; syntax highlighting
    28 (global-font-lock-mode t)                                             ; syntax highlighting
    29 (global-whitespace-mode t)                                            ; show whitespace
    29 (global-whitespace-mode t)                                            ; show whitespace
    30 (global-linum-mode t)
    30 (global-linum-mode t)
    31 (setq-default whitespace-style '(tab-mark trailing tabs empty))       ; what whitespace elements to show
       
    32 (add-hook 'before-save-hook 'whitespace-cleanup)                      ; cleanup whitespace on exit
    31 (add-hook 'before-save-hook 'whitespace-cleanup)                      ; cleanup whitespace on exit
    33 (global-set-key (kbd "C-c c") 'compile)                               ; compile
    32 (global-set-key (kbd "C-c c") 'compile)                               ; compile
    34 (global-set-key (kbd "C-c r") 'recompile)                             ; recompile
    33 (global-set-key (kbd "C-c r") 'recompile)                             ; recompile
       
    34 (setq-default whitespace-line-column 120)                             ; column width
       
    35 (setq-default whitespace-style
       
    36               '(tabs tab-mark trailing lines-tail
       
    37                      space-before-tab indentation empty))             ; what whitespace elements to show
    35 
    38 
    36 (require 'hoersten-pastebin-region)                                   ; send selected text to pastebin
    39 (require 'hoersten-pastebin-region)                                   ; send selected text to pastebin
    37 (require 'mercurial)                                                  ; load mercurial mode
    40 (require 'mercurial)                                                  ; load mercurial mode
    38 (require 'nav)                                                        ; load nav bar
    41 (require 'nav)                                                        ; load nav bar
    39 (require 'hoersten-c-style)                                           ; load c specific lisp
    42 (require 'hoersten-c-style)                                           ; load c specific lisp
    79                  ("\\.jj$"  . java-mode))
    82                  ("\\.jj$"  . java-mode))
    80                auto-mode-alist))
    83                auto-mode-alist))
    81 
    84 
    82 ;; x stuff
    85 ;; x stuff
    83 (if (not window-system)
    86 (if (not window-system)
    84     (menu-bar-mode nil) ; remove menu bar in no-x mode
    87     nil
       
    88   (menu-bar-mode nil)   ; remove menu bar in no-x mode
    85   (tool-bar-mode nil)   ; remove tool bar
    89   (tool-bar-mode nil)   ; remove tool bar
    86   (scroll-bar-mode nil) ; remove scroll bar
    90   (scroll-bar-mode nil) ; remove scroll bar
    87   (visual-line-mode t)  ; word wrap break on whitespace
    91   (visual-line-mode t)  ; word wrap break on whitespace
    88   (set-default-font "Monospace-10")
    92   (set-default-font "Monospace-10")
    89 
    93