Skip to content

fix: specify containing group for defface forms#21

Open
dannywillems wants to merge 2 commits into
ocaml:masterfrom
dannywillems:fix/byte-compile-warnings
Open

fix: specify containing group for defface forms#21
dannywillems wants to merge 2 commits into
ocaml:masterfrom
dannywillems:fix/byte-compile-warnings

Conversation

@dannywillems

Copy link
Copy Markdown

Byte-compiling caml-mode currently emits warnings for every face
defined without a containing customization group:

camldebug.el: in defface for `camldebug-event`: fails to specify containing group
camldebug.el: in defface for `camldebug-underline`: fails to specify containing group
caml-font.el: in defface for `caml-font-stop-face`: fails to specify containing group
caml-font.el: in defface for `caml-font-doccomment-face`: fails to specify containing group
caml-font-old.el: in defface for `caml-font-stop-face`: fails to specify containing group

Fixes (behaviour-preserving)

  • defface fails to specify containing group: add :group 'languages
    to each affected defface. This associates the faces with a
    customization group as required and does not change the face
    definitions, their default attributes, or any runtime behaviour.
    Affected faces: camldebug-event, camldebug-underline,
    caml-font-stop-face, caml-font-doccomment-face.

After this change all source files byte-compile with no warnings on
Emacs 24.4 (the declared minimum), 30.1, and the development snapshot.

CI

Adds a GitHub Actions workflow that byte-compiles every source file with
byte-compile-error-on-warn enabled, so any future byte-compile warning
fails CI. The matrix covers Emacs 24.4, 30.1, and snapshot, using
actions/checkout@v5 and purcell/setup-emacs@master. A Dependabot
config keeps the actions up to date.

Residual warnings

None. All byte-compile warnings are resolved.

Byte-compiling caml-mode emits warnings of the form "in defface for
FACE: fails to specify containing group" for every face defined without
a :group keyword.

Add ":group 'languages" to each affected defface so the faces are
associated with a customization group. This is the standard fix for the
warning and does not change runtime behaviour: the face definitions and
their default attributes are unchanged.

Affected faces:
- camldebug-event, camldebug-underline (camldebug.el)
- caml-font-stop-face, caml-font-doccomment-face (caml-font.el)
- caml-font-stop-face (caml-font-old.el)
Add a GitHub Actions workflow that byte-compiles all source files with
"byte-compile-error-on-warn" enabled, so any new byte-compile warning
fails CI. The matrix covers the declared minimum (Emacs 24.4), 30.1, and
the development snapshot, using actions/checkout@v5 and
purcell/setup-emacs@master.

Also add a Dependabot config to keep the GitHub Actions up to date.
@dannywillems

Copy link
Copy Markdown
Author

This is an automated effort to help maintaining packages in the Emacs community. See https://x.com/dwillems42/status/2060720730338185699 and https://dannywillems.github.io/emacs-package-maintenance/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant