 
 
 ;; Function to create new functions that look for a specific pattern
+(use-package cl)
 (defun ffip-create-pattern-file-finder (&rest patterns)
   (lexical-let ((patterns patterns))
     (lambda ()

  (vector 'remap 'end-of-buffer) 'dired-jump-to-bottom)

(add-hook 'ido-setup-hook
 (lambda ()
   ;; Go straight home
   (define-key ido-file-completion-map
     (kbd "~")
     (lambda ()
       (interactive)
       (if (looking-back "/")
           (insert "~/")
         (call-interactively 'self-insert-command))))))


(load "server")

  '(ace-jump-mode-enable-mark-sync))
(define-key global-map (kbd "C-x SPC") 'ace-jump-mode-pop-mark)

(use-package markdown-mode  :ensure t  :defer t)

(use-package groovy-mode  :ensure t  :defer t)

(use-package web-mode  :ensure t  :defer t
  :mode (("\\.html$" . web-mode)
         ("\\.mustache\\'" . web-mode)))

(use-package nxml  :ensure t  :defer t
  :mode ("\\.xsl\\'" . xml-mode))

(use-package undo-tree  :ensure t  :defer t)

(use-package macrostep  :ensure t  :defer t
  :bind ("C-c e m" . macrostep-expand))
(use-package browse-kill-ring  :ensure t  :defer t)
(global-set-key (kbd "C-c y") 'browse-kill-ring)

(use-package bm  :ensure t  :defer t)
(global-set-key (kbd "<C-f2>") 'bm-toggle)
(global-set-key (kbd "<f2>") 'bm-next)
(global-set-key (kbd "<S-f2>") 'bm-previous)

(use-package bookmark+  :ensure t  :defer t)
(use-package browse-kill-ring+  :ensure t  :defer t)
(use-package project-persist  :ensure t  :defer t)
(project-persist-mode t)

(use-package helm-descbinds  :ensure t  :defer t)
(use-package emacs-eclim  :ensure t  :defer t)
(require 'eclim)
(global-eclim-mode)
;; (require 'eclimd)

(use-package company  :ensure t  :defer t
  :config
  (add-hook 'after-init-hook 'global-company-mode))

