Commit Graph

121 Commits (master)

Author SHA1 Message Date
Takashi Masuda 39a012a27f Remove unnecessary require 2024-03-24 06:10:44 -04:00
David Larsson ae99b30c68 refactor: remove unnecessary dependency on s package 2024-03-23 10:57:39 -04:00
Roi Martin f619672634 Add s to Package-Requires list
After afcd418, dockerfile-mode fails to load with:

	File mode specification error: (file-missing Cannot open load file No such file or directory s)

This is because dockerfile-mode depends now on the function s-replace,
which is provided by the s package. This commit adds s to the list of
dependencies of dockerfile-mode.

Fixes #83.
2024-03-17 20:24:22 -04:00
David Larsson afcd418d82 fix(dockerfile-build-arg-string): remove incorrect escapes 2024-03-04 14:07:42 -05:00
David Larsson e9934072e3 fix(dockerfile-build-arg-string): fix concatenation with '=' 2024-03-04 14:07:42 -05:00
Leandro López (inkel) 35178a080f 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.
2024-02-23 08:57:43 -05:00
Konstantin Kharlamov 448b7ced29 Simplify checking line emptiness
Rather than doing skips and arithmetics (and also hardcoding the empty
space — note that there's more "empty" code characters than just tabs
and spaces), let's just have a single "empty line" regexp.
2024-02-19 13:08:32 -05:00
Konstantin Kharlamov 39d33264c0 Do not modify indentation if there's nothing to modify
The older code has been always deleting the whitespace, even if
indentation is already as expected. Fix that by replacing `indent-to`
with `indent-line-to` which avoids modifying the line if there's
nothing to modify.

As a bonus, this simplifies the code.
2024-02-19 13:08:32 -05:00
Lassi Kortela 52c6c00da1 Update docstring 2022-08-22 16:21:53 -04:00
Lassi Kortela e2d59c70cc Fix various lint warnings
- M-x checkdoc
- M-x package-lint-current-buffer
- M-x byte-compile-file
2022-08-22 16:21:53 -04:00
Shohei YOSHIDA 099bc8dcd7 Remove unnecessary configuration 2022-08-20 13:19:40 -04:00
Lassi Kortela 5e7096d451 Recognize Containerfile
"Containerfile" is a renaming of "Dockerfile" used by Buildah, Podman,
etc. The same syntax is used.

https://www.mankier.com/5/Containerfile
2022-08-20 10:33:54 -04:00
Alfonso Montero 73a8bcc255 Fix: remove repeated switch in docstring 2022-08-12 20:05:58 -04:00
Guilherme Thomazi Bonicontro c7e4e2541d updating build string example 2022-08-06 13:09:09 -04:00
Guilherme Thomazi Bonicontro 74ed3dfd15 feat(build): add option to specify --progress flag
some terminals won't handle ANSI escape codes very well. By default, docker build uses "auto" for this flag but it is desirable in several cases to use "plain" as a value here.
2022-08-06 13:09:09 -04:00
Alfonso Montero b63a3d12b7 Readme: document dockerfile-build-no-cache-buffer. Prevents #28. 2022-03-05 14:08:28 -05:00
pataquets 11c43de04b Add --pull and --force-rm switches toggling defcustoms. 2022-02-20 09:39:49 -05:00
Codruț Constantin Gușoi 5db94549ce Add a toggle for auto indentation 2021-10-16 11:45:52 -04:00
Alfonso Montero 83bc055f5b Readme: Replace obsolete variable name with current 2021-10-03 15:53:13 -04:00
Drew Csillag 628315e2e4 Added version and URL header 2021-08-28 14:05:25 -04:00
Brian Leung ad06a41259 Remove unnecessary declaration of dockerfile-mode-hook
The invocation of define-derived-mode defines the hook.
2021-04-04 18:24:26 -04:00
Juergen Hoetzel 3b1374563f Add support for TRAMP file names
Use localname component of the remote file name: Fixes #55
2021-03-26 14:12:35 -04:00
Lassi Kortela 07dde72b0e Add .elc files to .gitignore 2021-02-28 19:52:35 -05:00
Lassi Kortela fd8057e438 Fix elisp byte-compiler warning 2021-02-28 19:52:35 -05:00
Lassi Kortela efab0b100b Fix `M-x checkdoc` warnings 2021-02-28 19:52:35 -05:00
Lassi Kortela 533d5d4983 Tighten auto-mode-alist pattern some more
"/Dockerfile.foo/bar" should not match. To ensure we're looking at the
last pathname component, don't match slashes or backslashes.
2021-02-28 19:52:35 -05:00
Jim Myhrberg ed1d04c89c 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.
2021-02-18 12:46:23 -05:00
Drew Csillag b01f2ecdb6 Merge branch 'ncaq-add-dockerfile-indent-offset' 2021-02-15 11:33:25 -05:00
Drew Csillag 33bd07b9b2 resolved conflict 2021-02-15 11:32:18 -05:00
fredeb 27a9f4d2f3 Added the option to use docker buildkit 2021-02-13 16:18:28 -05:00
marketneutral a4f8aad581 FIX: make emacs lisp variable name consistent in README.md 2021-02-13 16:18:01 -05:00
madosuki 58b7380189 fix define-obsolete-function-alias error in Emacs28 2021-01-05 21:35:45 -05:00
Phil Sainty 6a56c1cc17 Remove dependency on s.el 2020-12-08 08:48:03 -05:00
ncaq 11dc6eb095 fixed: and -> or 2020-09-30 16:51:47 +09:00
ncaq 363aca7803 added: dockerfile-indent-offset
`tab-width` is not the size of an indentation step.

> NOTE: This controls the display width of a TAB character, and not the size of an indentation step.
>
> see `describe-variable` `tab-width`

So, I add dockerfile-indent-offset and respect `standard-indent`.
2020-03-16 14:17:17 +09:00
riscy d31f7685eb Remove keybinding to #'dockerfile-test-function 2020-01-06 21:26:41 +00:00
Shane Kennedy 780e6f51ca Add doc string for the format of the docker build command. 2020-01-06 21:25:57 +00:00
Shane Kennedy 652c2e0ba0 Remove logic for checking if there is an image-name provided 2020-01-06 21:25:57 +00:00
Shane Kennedy 24a5a6cee6 Allow builds without tag/image name 2020-01-06 21:25:57 +00:00
Sven Marquardt ed73e82dcc Added support to bin to different binary than path binary
Signed-off-by: Sven Marquardt <sven.marquardt@mail.smarquardt.space>
2019-05-05 14:07:58 -04:00
Terje Larsen 7223d92718 Support indentation for comments 2018-11-04 13:00:23 -05:00
Felipe Ochoa 9c788e04e7 Make indent-line-function a local variable 2018-11-03 14:26:34 -04:00
Aaron Jacobs 9f4381178a Adds a very simple indent-line-function for Dockerfiles.
Signed-off-by: Aaron Jacobs <atheriel@gmail.com>
2018-09-14 07:16:50 -04:00
Matus Goljer 4ebf274d49 Add imenu support 2018-09-14 07:16:33 -04:00
Drew Csillag 64733f64ea
Merge pull request #41 from Fuco1/feature/image-name-font-lock
Add faces for image name and alias
2018-06-28 12:59:55 -04:00
Drew Csillag 8172d83d5d
Merge pull request #40 from abloomston/safe-local-variable
README.md addition for safe-local-variable
2018-06-28 12:59:00 -04:00
Matus Goljer 902e4c2a5a Add faces for image name and alias 2018-06-28 17:41:57 +02:00
Adam Bloomston 6e1bf5dea4 README.md addition for safe-local-variable 2018-05-15 20:36:54 -07:00
Drew Csillag 818e6946fc
Merge pull request #39 from Fuco1/feature/better-auto-mode-detection
Recognize Dockerfile files with extension
2018-04-10 12:36:46 -04:00
Matus Goljer 05f8d76e2e
Recognize Dockerfile files with extension
Make filenames like `Dockerfile.example` or `Dockerfile.build` also 
open with `dockerfile-mode` automatically.
2018-04-09 16:55:46 +02:00