Skip to content

Commit ac6696d

Browse files
committed
Refactor pyimport--current-line
1 parent ca4dd48 commit ac6696d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pyimport.el

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@
4040

4141
(defun pyimport--current-line ()
4242
"Return the whole line at point, excluding the trailing newline."
43-
(save-excursion
44-
(let ((line-start (progn (beginning-of-line) (point)))
45-
(line-end (progn (end-of-line) (point))))
46-
(buffer-substring line-start line-end))))
43+
(buffer-substring-no-properties (line-beginning-position) (line-end-position)))
4744

4845
(defun pyimport--last-line-p ()
4946
"Return non-nil if the current line is the last in the buffer."

0 commit comments

Comments
 (0)