Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Github actions CI #18

Merged
merged 7 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
emacs_version:
- 25.1
- 25.2
- 25.3
- 26.1
- 26.2
- 26.3
- 27.1
- 27.2
- 28.1
- 28.2
- 29.1
- 29.2
- 29.3
- release-snapshot
steps:
- name: Setup emacs
uses: purcell/setup-emacs@master
with:
version: ${{ matrix.emacs_version }}

- name: Checkout repo
uses: actions/checkout@v4

- name: Lint
uses: leotaku/elisp-check@master
with:
file: eshell-syntax-highlighting.el
12 changes: 6 additions & 6 deletions eshell-syntax-highlighting.el
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@

(defvar eshell-syntax-highlighting--word-boundary-regexp "[^[:space:]&|;$'\"]*")

(defun eshell-syntax-highlighting--executable-find (command)
(defmacro eshell-syntax-highlighting--executable-find (command)
"Check if COMMAND is on the variable `exec-path'."
(if (< emacs-major-version 27)
(executable-find command)
(executable-find command t)))
`(executable-find ,command)
`(executable-find ,command t)))

(defun eshell-syntax-highlighting--goto-string-end (quote end)
"Find end of string marked by QUOTE before END."
Expand Down Expand Up @@ -318,7 +318,7 @@
(defvar eshell-syntax-highlighting--control-flow-commands '("if" "unless" "while" "until"))

(defun eshell-syntax-highlighting--parse-command (beg end command)
"Parse COMMAND in region (BEG, END) and highlight."
"In region (BEG, END), parse COMMAND and highlight."
(let ((next-expected
(cond

Expand Down Expand Up @@ -402,7 +402,7 @@
(eshell-syntax-highlighting--parse-and-highlight next-expected end)))

(defun eshell-syntax-highlighting--parse-and-highlight (expected end)
"Parse and highlight from point until END, expecting token of type EXPECTED."
"Parse and highlight EXPECTED token from point until END."
;; Whitespace
(when (re-search-forward "\\s-*" end t)
(eshell-syntax-highlighting--highlight
Expand Down Expand Up @@ -502,7 +502,7 @@

(defmacro eshell-syntax-highlighting--command-running-p ()
"Return non-nil if a foreground command is currently running."
(if (>= emacs-major-version 30)
(if (fboundp 'eshell-head-process)
'(eshell-head-process)
'eshell-current-command))

Expand Down