ein-pseudo-console.el 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. ;;; ein-pseudo-console.el --- Pseudo console mode
  2. ;; Copyright (C) 2012 Takafumi Arakaki
  3. ;; Author: Takafumi Arakaki <aka.tkf at gmail.com>
  4. ;; This file is NOT part of GNU Emacs.
  5. ;; ein-pseudo-console.el is free software: you can redistribute it
  6. ;; and/or modify it under the terms of the GNU General Public License
  7. ;; as published by the Free Software Foundation, either version 3 of
  8. ;; the License, or (at your option) any later version.
  9. ;; ein-pseudo-console.el is distributed in the hope that it will be
  10. ;; useful, but WITHOUT ANY WARRANTY; without even the implied warranty
  11. ;; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. ;; GNU General Public License for more details.
  13. ;; You should have received a copy of the GNU General Public License
  14. ;; along with ein-pseudo-console.el.
  15. ;; If not, see <http://www.gnu.org/licenses/>.
  16. ;;; Commentary:
  17. ;;
  18. ;;; Code:
  19. (defvar ein:pseudo-console-mode-map (make-sparse-keymap))
  20. (let ((map ein:pseudo-console-mode-map))
  21. (define-key map "\C-m" 'ein:worksheet-execute-cell-and-insert-below))
  22. ;;;###autoload
  23. (define-minor-mode ein:pseudo-console-mode
  24. "Pseudo console mode. Hit RET to execute code."
  25. :lighter " ein:pseudo"
  26. :keymap ein:pseudo-console-mode-map
  27. :group 'ein)
  28. ;; To avoid MuMaMo to discard `ein:pseudo-console-mode', make it
  29. ;; permanent local.
  30. (put 'ein:pseudo-console-mode 'permanent-local t)
  31. (provide 'ein-pseudo-console)
  32. ;;; ein-pseudo-console.el ends here