Personal emacs config
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.

55 lines
1.7 KiB

  1. ;;; ein-smartrep.el --- smartrep integration
  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-smartrep.el is free software: you can redistribute it and/or modify
  6. ;; it under the terms of the GNU General Public License as published by
  7. ;; the Free Software Foundation, either version 3 of the License, or
  8. ;; (at your option) any later version.
  9. ;; ein-smartrep.el is distributed in the hope that it will be useful,
  10. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;; 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-smartrep.el. If not, see <http://www.gnu.org/licenses/>.
  15. ;;; Commentary:
  16. ;;
  17. ;;; Code:
  18. (require 'smartrep nil t)
  19. (defcustom ein:smartrep-notebook-mode-alist
  20. '(("C-t" . ein:worksheet-toggle-cell-type)
  21. ("C-l" . ein:worksheet-clear-output)
  22. ("C-k" . ein:worksheet-kill-cell)
  23. ("C-y" . ein:worksheet-yank-cell)
  24. ("C-a" . ein:worksheet-insert-cell-above)
  25. ("C-b" . ein:worksheet-insert-cell-below)
  26. ("C-n" . ein:worksheet-goto-next-input)
  27. ("C-p" . ein:worksheet-goto-prev-input)
  28. ("C-m" . ein:worksheet-merge-cell)
  29. ("<up>" . ein:worksheet-move-cell-up)
  30. ("<down>" . ein:worksheet-move-cell-down))
  31. "alist passed to `smartrep-define-key'."
  32. :type '(repeat (cons string function))
  33. :group 'ein)
  34. (when (fboundp 'smartrep-define-key)
  35. (defmacro ein:smartrep-config (map)
  36. `(smartrep-define-key
  37. ,map
  38. "C-c"
  39. ein:smartrep-notebook-mode-alist)))
  40. (provide 'ein-smartrep)
  41. ;;; ein-smartrep.el ends here