Tags: spotify/dockerfile-mode
Tags
Remove obsolete function calls
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.
fix: false positives caused by auto-mode-alist pattern The old pattern would match the following filenames: - *Dockerfile - *Dockerfile.* This is because the pattern does not start with a slash indicating the beginning of the basename. Personally this led to a few false positives, like for example "siren-dockerfile.el" that sets up and configures dockerfile-mode in my Emacs configuration. This change restricts the patterns to: - Dockerfile - Dockerfile.* - *.dockerfile I believe this is still wide enough to capture all common naming conventions for Dockerfiles.