 ;; (add-hook 'c-mode-common-hook '(lambda () (c-toggle-auto-newline 1)))
 
 ;; Open urls
-(set 'browse-url-browser-function 'browse-url-generic)
-(set 'browse-url-generic-program "sensible-browser")
+(require 'browse-url)
+(validate-setq browse-url-browser-function 'browse-url-generic)
+(validate-setq browse-url-generic-program "sensible-browser")
 
 ;; Wrap lines at nearest word
 (diminish 'visual-line-mode)

(setq-default fill-column 80) ;; not 80 because when things are later indented
;; by e.g. diff, git log we lose some columns and
;; it gets messy.
(set 'abbrev-mode t) ;; Use abbrev mode always
(set 'tags-revert-without-query 1) ;; Autorevert if the tags table has changed

(set 'sentence-end-double-space nil)

;; Shut up and just open symbolic links
(set 'vc-follow-symlinks t)

;; Allow some disabled commands
(put 'narrow-to-region 'disabled nil)

;; (server-start) ;; Start emacs as a server
(line-number-mode 1) ;; Line numbers in mode line
(column-number-mode 1) ;; Column numbers in mode line
(validate-setq inhibit-startup-screen t) ;; No startup screen
(scroll-bar-mode -1);; No scroll bar
(validate-setq truncate-partial-width-windows nil) ;; Make line wrapping work for
;; multiple frames
(tool-bar-mode -1) ;; Disable toolbar
(menu-bar-mode -1) ;; Disable menu bar
