mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 09:31:39 -05:00
Add ein:notebook-mode-hook
This commit is contained in:
parent
09f0a3498f
commit
a43af7e9d2
1 changed files with 8 additions and 1 deletions
|
@ -970,6 +970,12 @@ Do not use `python-mode'. Use plain mode when MuMaMo is not installed::
|
||||||
(const :tag "Plain" ein:notebook-plain-mode)))
|
(const :tag "Plain" ein:notebook-plain-mode)))
|
||||||
:group 'ein)
|
:group 'ein)
|
||||||
|
|
||||||
|
(defcustom ein:notebook-mode-hook nil
|
||||||
|
"Hook for `ein:notebook-mode'.
|
||||||
|
This hook is run regardless the actual major mode used."
|
||||||
|
:type 'hook
|
||||||
|
:group 'ein)
|
||||||
|
|
||||||
(defun ein:notebook-choose-mode ()
|
(defun ein:notebook-choose-mode ()
|
||||||
"Return usable (defined) notebook mode."
|
"Return usable (defined) notebook mode."
|
||||||
;; So try to load extra modules here.
|
;; So try to load extra modules here.
|
||||||
|
@ -1162,7 +1168,8 @@ Do not use `python-mode'. Use plain mode when MuMaMo is not installed::
|
||||||
(defun ein:notebook-mode ()
|
(defun ein:notebook-mode ()
|
||||||
(funcall (ein:notebook-choose-mode))
|
(funcall (ein:notebook-choose-mode))
|
||||||
(ein:complete-on-dot-install
|
(ein:complete-on-dot-install
|
||||||
ein:notebook-mode-map 'ein:notebook-complete-dot))
|
ein:notebook-mode-map 'ein:notebook-complete-dot)
|
||||||
|
(run-hooks 'ein:notebook-mode-hook))
|
||||||
|
|
||||||
(define-derived-mode ein:notebook-plain-mode fundamental-mode "ein:notebook"
|
(define-derived-mode ein:notebook-plain-mode fundamental-mode "ein:notebook"
|
||||||
"IPython notebook mode without fancy coloring."
|
"IPython notebook mode without fancy coloring."
|
||||||
|
|
Loading…
Add table
Reference in a new issue