From 490e64bb659cf03f4db00745b29467c782f59d42 Mon Sep 17 00:00:00 2001 From: Alex Kreisher Date: Wed, 8 May 2024 19:08:33 -0700 Subject: [PATCH 1/7] CI test --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8c085da --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI +on: + - pull_request + - push +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + emacs_version: + - 24.4 + - 24.5 + - 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 From 4beeb971a18662e4e4f3dbb06d5314e1bb686403 Mon Sep 17 00:00:00 2001 From: Alex Kreisher Date: Wed, 8 May 2024 19:09:42 -0700 Subject: [PATCH 2/7] Rm 24 --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c085da..7c7b845 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,8 +8,6 @@ jobs: strategy: matrix: emacs_version: - - 24.4 - - 24.5 - 25.1 - 25.2 - 25.3 From 5087834d685b16a2e5579b0a4057727c0c3fad37 Mon Sep 17 00:00:00 2001 From: Alex Kreisher Date: Wed, 8 May 2024 19:16:14 -0700 Subject: [PATCH 3/7] Try macro --- eshell-syntax-highlighting.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eshell-syntax-highlighting.el b/eshell-syntax-highlighting.el index 08f761e..613f6fd 100644 --- a/eshell-syntax-highlighting.el +++ b/eshell-syntax-highlighting.el @@ -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." From af7e06fa06962d12c8ae983c6259e3fc6138a22b Mon Sep 17 00:00:00 2001 From: Alex Kreisher Date: Wed, 8 May 2024 19:31:41 -0700 Subject: [PATCH 4/7] Use fboundp for eshell-head-process --- eshell-syntax-highlighting.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eshell-syntax-highlighting.el b/eshell-syntax-highlighting.el index 613f6fd..d544a65 100644 --- a/eshell-syntax-highlighting.el +++ b/eshell-syntax-highlighting.el @@ -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)) From ceefe86f0676ed2bef2d741901bc5bd3b393a982 Mon Sep 17 00:00:00 2001 From: Alex Kreisher Date: Wed, 8 May 2024 19:33:13 -0700 Subject: [PATCH 5/7] Reorder docstring --- eshell-syntax-highlighting.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eshell-syntax-highlighting.el b/eshell-syntax-highlighting.el index d544a65..e7ca3fc 100644 --- a/eshell-syntax-highlighting.el +++ b/eshell-syntax-highlighting.el @@ -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 From 982efa5ac7699d1f4bf3290164c17c523e2f1bbb Mon Sep 17 00:00:00 2001 From: Alex Kreisher Date: Wed, 8 May 2024 19:35:10 -0700 Subject: [PATCH 6/7] Fix another docstring --- eshell-syntax-highlighting.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eshell-syntax-highlighting.el b/eshell-syntax-highlighting.el index e7ca3fc..f235908 100644 --- a/eshell-syntax-highlighting.el +++ b/eshell-syntax-highlighting.el @@ -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 From cc25f0065a16be9e966335a2744210f63a0dd0fb Mon Sep 17 00:00:00 2001 From: Alex Kreisher Date: Wed, 8 May 2024 19:39:20 -0700 Subject: [PATCH 7/7] Update on --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c7b845..9e0d751 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,11 @@ name: CI on: - - pull_request - - push + push: + branches: + - master + pull_request: + branches: + - master jobs: build: runs-on: ubuntu-latest