Emacs config utilizing prelude as a base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.1 KiB

  1. ;;; prelude-clojure.el --- Emacs Prelude: Clojure programming configuration.
  2. ;;
  3. ;; Copyright (c) 2011-2012 Bozhidar Batsov
  4. ;;
  5. ;; Author: Bozhidar Batsov <bozhidar@batsov.com>
  6. ;; URL: http://batsov.com/prelude
  7. ;; Version: 1.0.0
  8. ;; Keywords: convenience
  9. ;; Package-Requires: ((prelude-lisp "1.0.0") (clojure-mode "1.11.5") (nrepl "0.1.4"))
  10. ;; This file is not part of GNU Emacs.
  11. ;;; Commentary:
  12. ;; Some basic configuration for clojure-mode.
  13. ;;; License:
  14. ;; This program is free software; you can redistribute it and/or
  15. ;; modify it under the terms of the GNU General Public License
  16. ;; as published by the Free Software Foundation; either version 3
  17. ;; of the License, or (at your option) any later version.
  18. ;;
  19. ;; This program is distributed in the hope that it will be useful,
  20. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. ;; GNU General Public License for more details.
  23. ;;
  24. ;; You should have received a copy of the GNU General Public License
  25. ;; along with GNU Emacs; see the file COPYING. If not, write to the
  26. ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  27. ;; Boston, MA 02110-1301, USA.
  28. ;;; Code:
  29. (require 'prelude-lisp)
  30. (prelude-ensure-module-deps '(clojure-mode clojure-test-mode nrepl))
  31. (eval-after-load 'clojure-mode
  32. '(progn
  33. (defun prelude-clojure-mode-defaults ()
  34. (subword-mode +1)
  35. (clojure-test-mode +1)
  36. (run-hooks 'prelude-lisp-coding-hook))
  37. (setq prelude-clojure-mode-hook 'prelude-clojure-mode-defaults)
  38. (add-hook 'clojure-mode-hook (lambda ()
  39. (run-hooks 'prelude-clojure-mode-hook)))))
  40. (eval-after-load 'nrepl
  41. '(progn
  42. (add-hook 'nrepl-interaction-mode-hook 'nrepl-turn-on-eldoc-mode)
  43. (defun prelude-nrepl-mode-defaults ()
  44. (subword-mode +1)
  45. (run-hooks 'prelude-interactive-lisp-coding-hook))
  46. (setq prelude-nrepl-mode-hook 'prelude-nrepl-mode-defaults)
  47. (add-hook 'nrepl-mode-hook (lambda ()
  48. (run-hooks 'prelude-nrepl-mode-hook)))))
  49. (provide 'prelude-clojure)
  50. ;;; prelude-clojure.el ends here