1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- ;;; ein-smartrep.el --- smartrep integration
- ;; Copyright (C) 2012- Takafumi Arakaki
- ;; Author: Takafumi Arakaki <aka.tkf at gmail.com>
- ;; This file is NOT part of GNU Emacs.
- ;; ein-smartrep.el is free software: you can redistribute it and/or modify
- ;; it under the terms of the GNU General Public License as published by
- ;; the Free Software Foundation, either version 3 of the License, or
- ;; (at your option) any later version.
- ;; ein-smartrep.el is distributed in the hope that it will be useful,
- ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
- ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ;; GNU General Public License for more details.
- ;; You should have received a copy of the GNU General Public License
- ;; along with ein-smartrep.el. If not, see <http://www.gnu.org/licenses/>.
- ;;; Commentary:
- ;;
- ;;; Code:
- (require 'smartrep nil t)
- (require 'ein-notebook)
- (defcustom ein:smartrep-notebook-mode-alist
- '(("C-t" . ein:worksheet-toggle-cell-type)
- ("C-l" . ein:worksheet-clear-output)
- ("C-k" . ein:worksheet-kill-cell)
- ("C-y" . ein:worksheet-yank-cell)
- ("C-a" . ein:worksheet-insert-cell-above)
- ("C-b" . ein:worksheet-insert-cell-below)
- ("C-n" . ein:worksheet-goto-next-input)
- ("C-p" . ein:worksheet-goto-prev-input)
- ("C-m" . ein:worksheet-merge-cell)
- ("<up>" . ein:worksheet-move-cell-up)
- ("<down>" . ein:worksheet-move-cell-down)
- )
- "alist passed to `smartrep-define-key'."
- :group 'ein)
- (defun ein:smartrep-config ()
- (interactive)
- (smartrep-define-key
- ein:notebook-mode-map
- "C-c"
- ein:smartrep-notebook-mode-alist))
- (defvar ein:smartrep-config-once-called nil)
- (defun ein:smartrep-config-once ()
- (unless ein:smartrep-config-once-called
- (setq ein:smartrep-config-once-called t)
- (ein:smartrep-config)))
- (provide 'ein-smartrep)
- ;;; ein-smartrep.el ends here
|