mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 01:21:38 -05:00
Add ein:cell-relative-point function
This commit is contained in:
parent
0e385ceb69
commit
34a10d38b5
1 changed files with 6 additions and 0 deletions
|
@ -599,6 +599,12 @@ Called from ewoc pretty printer via `ein:cell-pp'."
|
|||
;; Skip the newline
|
||||
(forward-char))
|
||||
|
||||
(defmethod ein:cell-relative-point ((cell ein:basecell) &optional pos)
|
||||
"Return the point relative to the input area of CELL.
|
||||
If the position POS is not given, current point is considered."
|
||||
(unless pos (setq pos (point)))
|
||||
(- pos (1+ (ewoc-location (ein:cell-element-get cell :input)))))
|
||||
|
||||
(defmethod ein:cell-location ((cell ein:basecell) &optional elm end)
|
||||
"Return the starting location of CELL.
|
||||
ELM is a name (keyword) of element that `ein:cell-element-get'
|
||||
|
|
Loading…
Add table
Reference in a new issue