Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: swift-emacs/swift-mode
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v8.3.0
Choose a base ref
...
head repository: swift-emacs/swift-mode
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Aug 10, 2021

  1. Fix tags of customization

    taku0 committed Aug 10, 2021
    Copy the full SHA
    800efe2 View commit details

Commits on Sep 25, 2021

  1. Copy the full SHA
    05a661e View commit details
  2. Copy the full SHA
    9e220cb View commit details
  3. Copy the full SHA
    53e6a8c View commit details
  4. Bump version to 8.4.0

    taku0 committed Sep 25, 2021
    Copy the full SHA
    4ec7c73 View commit details

Commits on Oct 9, 2021

  1. Copy the full SHA
    abd6f87 View commit details
  2. Enable elisp linter

    taku0 committed Oct 9, 2021
    Copy the full SHA
    d39908a View commit details
  3. Wrap long line

    taku0 committed Oct 9, 2021
    Copy the full SHA
    a811c86 View commit details
  4. Bump version to 8.4.1

    taku0 committed Oct 9, 2021
    Copy the full SHA
    babe36c View commit details

Commits on Oct 17, 2021

  1. Fix face of function names

    Fixes #174.
    taku0 committed Oct 17, 2021
    Copy the full SHA
    e246264 View commit details
  2. Bump version to 8.4.2

    taku0 committed Oct 17, 2021
    Copy the full SHA
    b1325a3 View commit details

Commits on Oct 31, 2021

  1. Copy the full SHA
    4777c40 View commit details

Commits on Mar 13, 2022

  1. Add specialized comment fill function

    This incorporates certain Swift comment markup elements into comment
    filling, allowing `fill-paragraph` to nicely format most Swift doc
    comments.
    
    A new variable allows the user to configure their comment fill column
    differently from the code fill column, defaulting to 80.
    
    The implementation does not (yet) preserve indented lists or recognize
    fenced code blocks.
    woolsweater authored and taku0 committed Mar 13, 2022
    Copy the full SHA
    0d1ef0e View commit details

Commits on Jun 13, 2022

  1. Support `fill-region' and auto filling

    We fill only comments and strings.
    
    Removes `swift-mode:comment-fill-column' in favor of `comment-fill-column'.
    taku0 committed Jun 13, 2022
    Copy the full SHA
    8f11068 View commit details
  2. Support Emacs 28.1

    taku0 committed Jun 13, 2022
    Copy the full SHA
    a9e1931 View commit details
  3. Bump version to 8.5.0

    taku0 committed Jun 13, 2022
    Copy the full SHA
    c92e780 View commit details

Commits on Jun 18, 2022

  1. Fix indentation for async let

    taku0 committed Jun 18, 2022
    Copy the full SHA
    49cf361 View commit details
  2. Copy the full SHA
    3f22042 View commit details
  3. Copy the full SHA
    c7cc7a3 View commit details
  4. Copy the full SHA
    7de00af View commit details
  5. Copy the full SHA
    0119128 View commit details
  6. Copy the full SHA
    00ec81f View commit details
  7. Copy the full SHA
    da673f9 View commit details

Commits on Jul 9, 2022

  1. Improve test runners

    taku0 committed Jul 9, 2022
    Copy the full SHA
    f09a19b View commit details
  2. Delete src-autoloads.el

    taku0 committed Jul 9, 2022
    Copy the full SHA
    4267030 View commit details
  3. Rename comment-start and comment-end

    It caused errors in Emacs 24.
    taku0 committed Jul 9, 2022
    Copy the full SHA
    975e256 View commit details
  4. Copy the full SHA
    9b8a926 View commit details
  5. Bump version to 8.6.0

    taku0 committed Jul 9, 2022
    Copy the full SHA
    cdd194c View commit details

Commits on Sep 19, 2022

  1. Fix warnings

    - Add an email address to Maintainer header for elpa.nongnu.org.
    - Fix linter script to check dependency errors.
    - Fix dependency errors and other warnings.
    - Rename `test/swift-files/imenu/imenu-expected.el` to
      `test/swift-files/imenu/imenu-expected.eld` since it only contains data
      rather than code.
    
    Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
    taku0 and monnier committed Sep 19, 2022
    Copy the full SHA
    b3e090e View commit details

Commits on Sep 23, 2022

  1. Update linter

    taku0 committed Sep 23, 2022
    Copy the full SHA
    9f9cabb View commit details
  2. Add workaround comments

    taku0 committed Sep 23, 2022
    Copy the full SHA
    7552428 View commit details

Commits on Sep 24, 2022

  1. Add comments about workaround

    Those workarounds are no longer necessary since 29.1.
    taku0 committed Sep 24, 2022
    Copy the full SHA
    f4529ef View commit details

Commits on Nov 19, 2022

  1. Improve performance of beginning/end-of-defun

    Improve performance of `which-function':
    #180
    taku0 committed Nov 19, 2022
    Copy the full SHA
    6d7093f View commit details

Commits on Jan 17, 2023

  1. Copy the full SHA
    778e9e6 View commit details
  2. Copy the full SHA
    1244ee4 View commit details

Commits on May 7, 2023

  1. Copy the full SHA
    6beef52 View commit details
  2. Small fix for filling

    taku0 committed May 7, 2023
    Copy the full SHA
    fc3d16a View commit details
  3. Fix repl-executable for Swift 5.7

    Swift 5.5: `repl` is not mentioned in the manual but is ignored silently.
    Swift 5.6: `repl` is the default subcommand.
    Swift 5.7: `repl` is not default.
    taku0 committed May 7, 2023
    Copy the full SHA
    3efd087 View commit details

Commits on Jun 3, 2023

  1. Copy the full SHA
    83b691d View commit details

Commits on Jul 8, 2023

  1. Copy the full SHA
    25e41ed View commit details
  2. Bump version to 9.0.0

    taku0 committed Jul 8, 2023
    Copy the full SHA
    55da7a3 View commit details

Commits on Jul 24, 2023

  1. Fix current-defun-name to support qualified name

    Example: `extension A<T>.B.C<U>`.
    taku0 committed Jul 24, 2023
    Copy the full SHA
    d900694 View commit details

Commits on Aug 12, 2023

  1. Update contributor address

    taku0 committed Aug 12, 2023
    Copy the full SHA
    4c2231e View commit details

Commits on Aug 19, 2023

  1. Update for Emacs 29

    - Update CI
    - Update indentations
    taku0 committed Aug 19, 2023
    Copy the full SHA
    609471e View commit details

Commits on Aug 31, 2023

  1. Fix inner scope guard indent

    nhojb authored and taku0 committed Aug 31, 2023
    Copy the full SHA
    2b2e858 View commit details

Commits on Sep 30, 2023

  1. Copy the full SHA
    221863c View commit details
  2. Copy the full SHA
    6194d95 View commit details
  3. Copy the full SHA
    6b19157 View commit details
  4. Copy the full SHA
    1339e24 View commit details
19 changes: 17 additions & 2 deletions .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
@@ -16,14 +16,27 @@ jobs:
# '25.1' fails for some reason even though `make lint_in_docker` succeeds.
# swift-mode-beginning-of-defun.el:1081: All variables and subroutines might as well have a documentation string
# swift-mode-beginning-of-defun.el:1135: All variables and subroutines might as well have a documentation string
version: ['24.4', '24.5', '25.2', '25.3', '26.1', '26.2', '26.3', '27.1', '27.2', 'snapshot']
version:
- '29.1'
- '28.2'
- '28.1'
- '27.2'
- '27.1'
- '26.3'
- '26.2'
- '26.1'
- '25.3'
- '25.2'
- '24.5'
- '24.4'
- 'snapshot'

env:
ELDEV_DIR: .eldev
ELDEV: .eldev/bin/eldev

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: purcell/setup-emacs@master
with:
version: ${{ matrix.version }}
@@ -33,6 +46,8 @@ jobs:
curl -fsSL https://raw.github.com/doublep/eldev/master/bin/eldev > $ELDEV_DIR/bin/eldev
chmod a+x $ELDEV_DIR/bin/eldev
- name: Run linters
# Indentation rules changed since 29.
if: ${{ startsWith(matrix.version, '29.') }}
run: find ./*.el test/*.el '!' -name '*autoloads.el' -exec ${ELDEV} lint '{}' '+'
- name: Run tests
run: ./scripts/run_test.sh
3 changes: 3 additions & 0 deletions Eldev
Original file line number Diff line number Diff line change
@@ -2,6 +2,9 @@

(eldev-use-package-archive 'gnu)
(eldev-use-package-archive 'melpa)

(eldev-add-loading-roots 'test "test")

(setq elisp-lint-indent-specs
'((swift-mode:with-temp-comment-buffer . 0)))

9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -172,6 +172,15 @@ var x = foo

Both are syntactically correct code. We cannot handle this case properly. This is also a future work.

Other example is regex literals and custom operators. The following example is valid Swift code with regex literals and custom operators.

```swift
let x = /^/ /^/ /^/
```

We parse them as regex literals rather than custom operators for now.


## Hacking

To build the package locally, run `make package`.
11 changes: 7 additions & 4 deletions scripts/lint_in_docker.sh
Original file line number Diff line number Diff line change
@@ -2,16 +2,19 @@

# Run linter in Docker. Used in Makefile.

for version in 24 25 26 27
# Indentation rules changed since 29.
for version in 29 # 28 27 26 25 24
do
docker \
run \
--rm \
--volume="$(pwd)":/src \
--user "$(id -u):$(id -g)" \
--user="$(id -u):$(id -g)" \
--workdir="/src" \
--env=ELDEV_DIR=/src/.eldev \
--env=HOME=/tmp \
silex/emacs:${version} \
bash -c \
"cd /src && ELDEV_DIR=/src/.eldev HOME=/tmp ./scripts/run_linter.sh" \
bash -c "/src/scripts/run_linter.sh" \
|| exit 1
done

6 changes: 5 additions & 1 deletion scripts/run_linter.sh
Original file line number Diff line number Diff line change
@@ -3,4 +3,8 @@
# Run linter. Used in Makefile.

./scripts/invoke_eldev.sh emacs --version || exit 1
find ./*.el test/*.el '!' -name '*autoloads.el' -exec ./scripts/invoke_eldev.sh lint '{}' '+'
find . -name '*.elc' -exec rm '{}' '+' || exit 1
rm -f *-autoloads.el || exit 1
./scripts/invoke_eldev.sh compile --set=all
find ./*.el test/*.el '!' -name '*autoloads.el' -exec \
./scripts/invoke_eldev.sh lint doc re elisp '{}' '+'
8 changes: 3 additions & 5 deletions scripts/run_test.sh
Original file line number Diff line number Diff line change
@@ -3,13 +3,11 @@
# Run tests. Used in Makefile.

./scripts/invoke_eldev.sh emacs --version || exit 1
./scripts/invoke_eldev.sh compile --set=all || exit 1
./scripts/invoke_eldev.sh emacs --batch -q \
--eval "(add-to-list 'load-path \"$(readlink -f .)\")" \
--eval "(add-to-list 'load-path \"$(readlink -f .)/test\")" \
-f batch-byte-compile \
./*.el || exit 1
./scripts/invoke_eldev.sh emacs --batch -q \
--eval "(add-to-list 'load-path \"$(readlink -f .)\")" \
--eval "(add-to-list 'load-path \"$(readlink -f .)/test\")" \
--eval "(setq debug-on-error t)" \
--eval "(setq max-lisp-eval-depth 1600)" \
-l test/swift-mode-test.el \
-f swift-mode:run-test
14 changes: 9 additions & 5 deletions scripts/test_in_docker.sh
Original file line number Diff line number Diff line change
@@ -2,16 +2,20 @@

# Run tests in Docker. Used in Makefile.

for version in 24 25 26 27
for version in 29 28 27 26 25 24
do
rm -f *.elc test/*.elc
rm -f *-autoloads.el
docker \
run \
--rm \
--volume="$(pwd)":/src \
--user "$(id -u):$(id -g)" \
silex/emacs:${version} \
bash -c \
"cd /src && ELDEV_DIR=/src/.eldev HOME=/tmp ./scripts/run_test.sh" \
--user="$(id -u):$(id -g)" \
--workdir="/src" \
--env=ELDEV_DIR=/src/.eldev \
--env=HOME=/tmp \
silex/emacs:${version}-ci \
bash -c "/src/scripts/run_test.sh" \
|| exit 1
done

204 changes: 0 additions & 204 deletions src-autoloads.el

This file was deleted.

Loading