Skip to content

Commit 9a31a12

Browse files
committed
Use line-beginning-position and line-end-position
1 parent 627256f commit 9a31a12

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

gnuplot.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,7 @@ For most lines, set indentation to previous level of indentation.
16081608
Add additional indentation for continuation lines."
16091609
(interactive)
16101610
(let (indent)
1611-
(if (gnuplot-in-string (point-at-bol))
1611+
(if (gnuplot-in-string (line-beginning-position))
16121612
;; Continued strings begin at left margin
16131613
(setq indent 0)
16141614
(save-excursion
@@ -1619,7 +1619,7 @@ Add additional indentation for continuation lines."
16191619
(progn
16201620
(gnuplot-beginning-of-continuation)
16211621
(back-to-indentation)
1622-
(re-search-forward "\\S-+\\s-+" (point-at-eol) 'end-at-limit)
1622+
(re-search-forward "\\S-+\\s-+" (line-end-position) 'end-at-limit)
16231623
(setq indent (current-column)))
16241624

16251625
;; Not a continuation line; indent according to block
@@ -1628,7 +1628,7 @@ Add additional indentation for continuation lines."
16281628
(condition-case nil
16291629
(progn
16301630
(beginning-of-line)
1631-
(skip-syntax-forward "-" (point-at-eol))
1631+
(skip-syntax-forward "-" (line-end-position))
16321632
(if (looking-at "\\s)") (forward-char))
16331633
(backward-up-list)
16341634
(gnuplot-beginning-of-continuation)
@@ -1696,7 +1696,7 @@ If there are no continuation lines, move point to `end-of-line'."
16961696
(defun gnuplot-point-at-beginning-of-continuation (&optional pos)
16971697
"Return value of point at beginning of the continued block containing point.
16981698
1699-
If there are no continuation lines, returns `point-at-bol'.
1699+
If there are no continuation lines, returns `line-beginning-position'.
17001700
If specify POS, move POS befere execution."
17011701
(save-excursion
17021702
(when pos (goto-char pos))
@@ -1706,7 +1706,7 @@ If specify POS, move POS befere execution."
17061706
(defun gnuplot-point-at-end-of-continuation (&optional pos)
17071707
"Return value of point at the end of the continued block containing point.
17081708
1709-
If there are no continuation lines, returns `point-at-eol'.
1709+
If there are no continuation lines, returns `line-end-position'.
17101710
If specify POS, move POS before execution."
17111711
(save-excursion
17121712
(when pos (goto-char pos))

0 commit comments

Comments
 (0)