oeditのC-oとかC-eとかC-aをやってみた。

;;C-a で行頭へ
(define (beginning-of-line)
		(editor-set-row-col (editor-get-cur-row) 0))
;;C-e で行末へ
(define (end-of-line)
		(editor-set-row-col (editor-get-cur-row) 1024))
;;1024は適当。
;;っていうか現在のカーソル位置の文字列が取得できないので相当に無理やりだけど。

;; C-oでopen-line
(define (open-line)
		(editor-paste-string "\n")
		(editor-set-row-col (editor-get-cur-row) (editor-get-cur-col)))

っていうかエディタの制御する手続きが少ないので、xyzzyとかよりなんか逆の意味で難しいような気がする。

■追記
ひょっとすると、こういうマクロの場合ファイルの中身を全部読み込んで、現在のカーソルのある行が何文字かを調べるとかして行末に移動する方が、まともな思考回路なのかもしれないなぁとか思ってみた。