Skip to content

Commit

Permalink
Remove obsolete function calls
Browse files Browse the repository at this point in the history
In Emacs 29.1 the `point-at-bol` and `point-at-eol` functions are
obsolete. This removes the following warnings when compiling the file:

    In dockerfile-indent-line-function:
    dockerfile-mode.el:159:41: Warning: ‘point-at-bol’ is an obsolete function (as
        of 29.1); use ‘line-beginning-position’ or ‘pos-bol’ instead.
    dockerfile-mode.el:163:37: Warning: ‘point-at-eol’ is an obsolete function (as
        of 29.1); use ‘line-end-position’ or ‘pos-eol’ instead.
    dockerfile-mode.el:164:32: Warning: ‘point-at-eol’ is an obsolete function (as
        of 29.1); use ‘line-end-position’ or ‘pos-eol’ instead.
    dockerfile-mode.el:166:27: Warning: ‘point-at-bol’ is an obsolete function (as
        of 29.1); use ‘line-beginning-position’ or ‘pos-bol’ instead.

It is safe to use these new functions as they were introduced as of
Emacs 20.
  • Loading branch information
inkel authored and drewcsillag committed Feb 23, 2024
1 parent 448b7ce commit 35178a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dockerfile-mode.el
Expand Up @@ -156,7 +156,7 @@ Lines beginning with a keyword are ignored, and any others are
indented by one `dockerfile-indent-offset'. Functionality toggled
by `dockerfile-enable-auto-indent'."
(when dockerfile-enable-auto-indent
(unless (member (get-text-property (point-at-bol) 'face)
(unless (member (get-text-property (line-beginning-position) 'face)
'(font-lock-comment-delimiter-face font-lock-keyword-face))
(save-excursion
(beginning-of-line)
Expand Down

0 comments on commit 35178a0

Please sign in to comment.