Skip to content

Commit

Permalink
Replace pos-eol with older line-end-position function
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcgilchrist committed Sep 13, 2024
1 parent 553b57c commit 77f2dc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions emacs/merlin-cap-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
(with-current-buffer messages-buffer-name
(save-excursion
(forward-line -1)
(buffer-substring (point) (pos-eol)))))
(buffer-substring (point) (line-end-position)))))

(defmacro merlin-cap--with-test-buffer (&rest body)
"Run BODY with a temp buffer set up for Merlin completion."
Expand Down Expand Up @@ -111,14 +111,14 @@ completion, and MESSAGE is the message printed."
(message "\n")
(message "[no message]")
(completion-at-point)
(let ((end (pos-eol))
(let ((end (line-end-position))
;; Just so the ERT error renders more nicely
(point (point)))
(should (equal (list (buffer-substring start point)
(buffer-substring point end)
(merlin-cap--current-message))
(list new-prefix new-suffix message))))
(delete-region start (pos-eol))))
(delete-region start (line-end-position))))

(ert-deftest test-merlin-cap-completion ()
(with-temp-buffer
Expand Down

0 comments on commit 77f2dc1

Please sign in to comment.