Skip to content

Commit

Permalink
Adding GitHub Action for continuous integration.
Browse files Browse the repository at this point in the history
* Test all supported Emacs versions.
* Fix style issues.
  • Loading branch information
chaosemer committed Nov 20, 2023
1 parent b9d9a2a commit 43023a3
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 13 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: test
on:
# - schedule:
# - cron: '0 0 * * *'
- push
- pull_request
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# Emacs 27.x spits out errors during package-lint. Ignore those
# warnings.
- emacs_version: 27.1
warnings_as_errors: false
- emacs_version: 27.2
warnings_as_errors: false
# All other Emacs versions should have no warnings.
- emacs_version: 28.1
warnings_as_errors: true
- emacs_version: 28.2
warnings_as_errors: true
- emacs_version: 29.1
warnings_as_errors: true
steps:
- uses: purcell/[email protected]
with:
version: ${{ matrix.emacs_version }}
- uses: actions/checkout@v4
- uses: leotaku/elisp-check@master
with:
check: melpa
file: '*.el'
warnings_as_errors: ${{ matrix.warnings_as_errors }}
26 changes: 13 additions & 13 deletions init-dir.el
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
;;; init-dir.el --- Init directory instead of just a single file. -*- lexical-binding: t; -*-
;;; init-dir.el --- Init directory instead of just a single file -*- lexical-binding: t; -*-

;; Copyright 2005-2023 Jared Finder
;; Author: Jared Finder <[email protected]>
;; Created: Feb 22, 2005
;; Version: 0.1-beta
;; Keywords: extensions, internal
;; URL: http://github.com/chaosemer/init-dir
;; Author: Jared Finder <[email protected]>
;; Created: Feb 22, 2005
;; Version: 0.1-beta
;; Keywords: extensions, internal
;; URL: http://github.com/chaosemer/init-dir
;; Package-Requires: ((emacs "27.1"))

;; This file is not part of GNU Emacs.

Expand Down Expand Up @@ -56,12 +57,12 @@
;; (after loading init in case the user wants to disable this
;; feature).
;;
;; Add integration tests with all supported versions of Emacs.
;; Add unit tests.

;;; Code:

(defun init-dir--file-init-loadable-p (file)
"Tests if FILE should be loaded at Emacs initialization."
"Test if FILE should be loaded at Emacs initialization."
(and (file-regular-p file)
(member (file-name-extension file t) load-suffixes)))

Expand All @@ -81,7 +82,7 @@ MATCH, NOSORT have the same meaning as in `directory-files'."
"Controls if a file gets a warning if it takes too long to load.
Best practice is to increment this using `cl-incf' next to known
slow operations. This can also be set to `nil' to completely
slow operations. This can also be set to nil to completely
disable the long load warning.
Also see `init-dir-load'.")
Expand All @@ -91,16 +92,15 @@ Also see `init-dir-load'.")
(defun init-dir-load (&optional dir)
"Load files from DIR for initialization.
If unset, DIR defaults to \"init\" in `user-emacs-directory',
either ~/.config/emacs/init/ or ~/.emacs.d/init/. See info node
`Find Init'.
If unset, DIR defaults to \"init\" in `user-emacs-directory'.
See info node `Find Init'.
The common use here is to have your init file be very short and
keep all configuration in a separate directory. To use this
behavior, move your configuration to files inside one of these
directories and put just this single line in your init file:
(init-dir-load)
\(init-dir-load)
Files will be loaded (via `load') in alphabetical order. This is
intended to be used in your init file to load configuration that
Expand Down

0 comments on commit 43023a3

Please sign in to comment.