     (while (search-forward (string ?\C-m) nil t)
                 (replace-match (string ?\C-j) nil t))))
 
-;; (ensure-packages-compiled)
-
-;; (load "server")
-;; (unless (server-running-p)
-;;   (server-start))
 (put 'upcase-region 'disabled nil)
 (put 'narrow-to-region 'disabled nil)
 


(setq use-package-verbose t)

;;(use-package f :ensure t)
;;(use-package s :ensure t)
;;(use-package dash :ensure t)
(use-package bug-hunter  :ensure t  :defer t)
(use-package visual-regexp  :ensure t  :defer t)
;;(use-package auto-complete :ensure t)
(use-package misc-cmds :ensure t)
(use-package ag :ensure t)

;; Enable puml-mode for PlantUML files
(add-to-list 'auto-mode-alist '("\\.puml\\'" . puml-mode))
(add-to-list 'auto-mode-alist '("\\.plantuml\\'" . puml-mode))

;; (use-package ido   
;;   :ensure t
;;   :init  
;;   (ido-mode 1)
;;   (ido-everywhere 1)
;;   :config
;;   (progn
;;     (setq ido-case-fold t)
;;     (setq ido-everywhere t)
;;     (setq ido-enable-prefix nil)
;;     (setq ido-enable-flex-matching t)
;;     (setq ido-create-new-buffer 'always)
;;     (setq ido-max-prospects 10)
;;     (setq ido-use-faces nil)
;;     (setq ido-file-extensions-order '(".el" ".java" ".js" ".rb"))
;;     (add-to-list 'ido-ignore-files "\\.DS_Store"))
;;     (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)))))))

;; (defadvice ido-find-file (after find-file-sudo activate)
;;   "Find file as root if necessary."
;;   (unless (and buffer-file-name
;;                (file-writable-p buffer-file-name))
;;     (find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name))))

(defun sudo ()
  "Use TRAMP to `sudo' the current buffer"

     (concat "/sudo:root@localhost:"
             buffer-file-name))))

(use-package switch-window  :ensure t  
  :bind ("C-x o" . switch-window))

;;(use-package ace-window  :ensure t )
(use-package 4clojure :ensure t)

;; JSP
(use-package crappy-jsp-mode
  :config
  (add-to-list 'auto-mode-alist '("\\.jsp$" . crappy-jsp-mode)))


(use-package exec-path-from-shell
  :ensure t
