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.

50 lines
1.7 KiB

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