@@ -216,7 +216,7 @@ This is similar to `backward-delete-char' but protects the prompt/context line."
216216 context-item)
217217 (setq-local eca-chat--context (delete context-item eca-chat--context))
218218 (eca-chat--refresh-context)
219- (goto-char ( line- end-position ) ))
219+ (end-of-line ))
220220
221221 ((and cur-ov
222222 (<= (point ) (overlay-start cur-ov)))
@@ -259,7 +259,7 @@ This is similar to `backward-delete-char' but protects the prompt/context line."
259259 " Return non-nil if point is at the context area."
260260 (and (eq (line-number-at-pos (point ))
261261 (line-number-at-pos (eca-chat--prompt-area-start-point)))
262- (eq ( point ) ( line-end-position ) )))
262+ (eolp )))
263263
264264(defun eca-chat--header-line-string ()
265265 " Update chat header line."
@@ -386,7 +386,7 @@ This is similar to `backward-delete-char' but protects the prompt/context line."
386386 (pcase type
387387 (" file" (eca-chat--add-context type path))
388388 (" directory" (eca-chat--add-context type path))))
389- (goto-char ( line- end-position ) ))
389+ (end-of-line ))
390390
391391(defun eca-chat--context-to-completion (context )
392392 " Convert CONTEXT to a completion item."
@@ -403,11 +403,8 @@ This is similar to `backward-delete-char' but protects the prompt/context line."
403403\\ {eca-chat-mode-map}"
404404 :group 'eca
405405 (setq major-mode 'eca-chat-mode )
406- (setq mode-name " eca-chat" )
407406 (visual-line-mode )
408407 (hl-line-mode -1 )
409- ; ; (buffer-disable-undo)
410- (use-local-map eca-chat-mode-map)
411408 (setq-local eca-chat--history '())
412409 (setq-local eca-chat--history-index 0 )
413410
0 commit comments