mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 01:21:38 -05:00

* add ein:use-SUBPACKAGE customizable variables. * add ein:SUBPACKAGE-config-once fuctions. * add ein:subpackages-load function.
56 lines
1.6 KiB
EmacsLisp
56 lines
1.6 KiB
EmacsLisp
;;; ein-smartrep.el --- smartrep integration
|
|
|
|
;; Copyright (C) 2012- Takafumi Arakaki
|
|
|
|
;; Author: Takafumi Arakaki
|
|
|
|
;; 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)
|
|
(require 'ein-notebook)
|
|
|
|
(defun ein:smartrep-config ()
|
|
(interactive)
|
|
(smartrep-define-key
|
|
ein:notebook-mode-map
|
|
"C-c"
|
|
'(("C-t" . ein:notebook-toggle-cell-type)
|
|
("C-d" . ein:notebook-delete-cell-command)
|
|
("C-a" . ein:notebook-insert-cell-above-command)
|
|
("C-b" . ein:notebook-insert-cell-below-command)
|
|
("C-n" . ein:notebook-goto-next-input-command)
|
|
("C-p" . ein:notebook-goto-prev-input-command)
|
|
("<up>" . ein:notebook-move-cell-up-command)
|
|
("<down>" . ein:notebook-move-cell-down-command)
|
|
)))
|
|
|
|
|
|
(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
|