Move custom.el definition, use default mu4e start screen.

This commit is contained in:
Ivan Malison 2014-12-15 16:50:03 -08:00
parent 159a1051fb
commit 3400affd5d

55
init.el
View File

@ -36,15 +36,6 @@
(defvar predicate nil) (defvar predicate nil)
(defvar inherit-input-method nil) (defvar inherit-input-method nil)
;; =============================================================================
;; Load Path Configuration
;; =============================================================================
(defvar machine-custom "~/.emacs.d/this-machine.el")
(setq custom-file "~/.emacs.d/custom.el")
(when (file-exists-p custom-file) (load custom-file))
(when (file-exists-p machine-custom) (load machine-custom))
;; ============================================================================= ;; =============================================================================
;; ELPA/package.el/MELPA ;; ELPA/package.el/MELPA
;; ============================================================================= ;; =============================================================================
@ -154,6 +145,11 @@
;; functions ;; functions
;; ============================================================================= ;; =============================================================================
(defmacro defvar-setq (name value)
(if (boundp name)
`(setq ,name ,value)
`(defvar ,name ,value)))
(defun undo-redo (&optional arg) (defun undo-redo (&optional arg)
(interactive "P") (interactive "P")
(if arg (undo-tree-redo) (undo-tree-undo))) (if arg (undo-tree-redo) (undo-tree-undo)))
@ -298,6 +294,15 @@ The current directory is assumed to be the project's root otherwise."
(error "You're not in a project") (error "You're not in a project")
default-directory))))) default-directory)))))
;; =============================================================================
;; Load Path Configuration
;; =============================================================================
(defvar machine-custom "~/.emacs.d/this-machine.el")
(setq custom-file "~/.emacs.d/custom.el")
(when (file-exists-p custom-file) (load custom-file))
(when (file-exists-p machine-custom) (load machine-custom))
;; ============================================================================= ;; =============================================================================
;; General Emacs Options ;; General Emacs Options
;; ============================================================================= ;; =============================================================================
@ -418,15 +423,15 @@ The current directory is assumed to be the project's root otherwise."
(setq ace-isearch-use-function-from-isearch nil) (setq ace-isearch-use-function-from-isearch nil)
(setq ace-isearch-input-idle-delay 1))) (setq ace-isearch-input-idle-delay 1)))
(use-package flycheck ;; (use-package flycheck
:ensure t ;; :ensure t
:commands (flycheck-mode) ;; :commands (flycheck-mode)
:init (add-hook 'after-init-hook #'flycheck-mode) ;; :init (add-hook 'after-init-hook #'flycheck-mode)
:config ;; :config
(progn ;; (progn
(setq flycheck-checkers (delq 'emacs-lisp-checkdoc flycheck-checkers)) ;; (setq flycheck-checkers (delq 'emacs-lisp-checkdoc flycheck-checkers))
(global-flycheck-mode) ;; (global-flycheck-mode)
(diminish 'flycheck-mode))) ;; (diminish 'flycheck-mode)))
(use-package haskell-mode (use-package haskell-mode
:ensure t :ensure t
@ -620,14 +625,18 @@ The current directory is assumed to be the project's root otherwise."
(defvar org-gtd-file "~/org/gtd.org")) (defvar org-gtd-file "~/org/gtd.org"))
(unless (boundp 'org-habits-file) (unless (boundp 'org-habits-file)
(defvar org-habits-file "~/org/habits.org")) (defvar org-habits-file "~/org/habits.org"))
(unless (boundp 'org-capture-templates)
(defvar org-capture-templates nil))
(unless (boundp 'org-calendar-file) (unless (boundp 'org-calendar-file)
(defvar org-calendar-file "~/org/calendar.org")) (defvar org-calendar-file "~/org/calendar.org"))
(unless (boundp 'org-capture-templates)
(defvar org-capture-templates nil))
(message "At org load%s" org-habits-file)
(setq org-agenda-files (setq org-agenda-files
(--filter (file-exists-p it) (--filter (file-exists-p it)
(list org-gtd-file org-habits-file org-projectile:projects-file (list org-gtd-file org-habits-file org-projectile:projects-file
org-calendar-file))) org-calendar-file)))
(message "At org load%s" org-agenda-files)
(add-to-list 'org-capture-templates (add-to-list 'org-capture-templates
`("h" "Habit" entry (file+headline ,org-habits-file "Habits") `("h" "Habit" entry (file+headline ,org-habits-file "Habits")
@ -781,9 +790,9 @@ The current directory is assumed to be the project's root otherwise."
(insert (format "mu4e: --- %s" (documentation major-mode)))))) (insert (format "mu4e: --- %s" (documentation major-mode))))))
;; Don't use the default mu4e start screen ;; Don't use the default mu4e start screen
(defun mu4e () ;; (defun mu4e ()
(interactive) ;; (interactive)
(mu4e~start 'imalison:mu4e-startup)) ;; (mu4e~start 'imalison:mu4e-startup))
;; use imagemagick, if available ;; use imagemagick, if available
(when (fboundp 'imagemagick-register-types) (when (fboundp 'imagemagick-register-types)