Skip to content

Commit 59dcd60

Browse files
committed
Fix errors in 24.4
1 parent 50394e4 commit 59dcd60

File tree

9 files changed

+19
-18
lines changed

9 files changed

+19
-18
lines changed

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ env:
55
- EVM_EMACS=emacs-24.4-travis
66
- EVM_EMACS=emacs-24.5-travis
77
- EVM_EMACS=emacs-25.1-travis
8-
- EVM_EMACS=emacs-git-snapshot
8+
- EVM_EMACS=emacs-25.2-travis
99

1010
before_install:
1111
- curl -fsSkL https://raw.github.com/rejeep/evm/master/go | bash
1212
- export PATH="/home/travis/.evm/bin:$PATH"
1313
- evm config path /tmp
1414
- evm install $EVM_EMACS --skip --use
15+
- export EMACS=$(evm bin)
1516
- curl -fsSL https://raw.githubusercontent.com/cask/cask/master/go | python
1617
- export PATH="/home/travis/.cask/bin:$PATH"
1718
- cask info
@@ -21,8 +22,6 @@ before_install:
2122

2223
matrix:
2324
fast_finish: true
24-
allow_failures:
25-
- env: EVM_EMACS=emacs-git-snapshot
2625

2726
script:
28-
- make test
27+
- make deps test

Makefile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
CASK ?= cask
22
EMACS ?= emacs
33
VERSION := $(shell EMACS=$(EMACS) $(CASK) version)
4-
PKG_DIR := $(shell EMACS=$(EMACS) $(CASK) package-directory)
54

65
SRC = $(wildcard *.el)
76
PACKAGE = dist/swift-mode-$(VERSION).tar
@@ -23,11 +22,9 @@ help:
2322
all: package
2423
## Builds the package.
2524

26-
$(PKG_DIR): ## no-doc
27-
$(CASK) install
28-
29-
deps: $(PKG_DIR)
25+
deps:
3026
## Installs the dependencies.
27+
$(CASK) install
3128

3229
$(PACKAGE): $(SRC) deps ## no-doc
3330
rm -rf dist
@@ -41,13 +38,14 @@ install: package
4138
$(CASK) exec $(EMACS) --batch \
4239
-l package \
4340
-f package-initialize \
41+
-f package-refresh-contents \
4442
--eval '(package-install-file "$(PACKAGE)")'
4543

4644
clean:
4745
## Cleans the dist directory.
4846
rm -rf dist
4947

50-
test: deps
48+
test:
5149
## Tests the package.
5250
$(CASK) exec $(EMACS) --batch -q \
5351
--eval "(add-to-list 'load-path \""$(shell readlink -f .)"\")" \

swift-mode-beginning-of-defun.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
;; Authors: taku0 (http://github.com/taku0)
66
;;
77
;; Version: 2.4.0
8-
;; Package-Requires: ((emacs "24.4"))
8+
;; Package-Requires: ((emacs "24.4") (seq "2.3"))
99
;; Keywords: languages swift
1010

1111
;; This file is not part of GNU Emacs.

swift-mode-font-lock.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
;; Arthur Evstifeev <lod@pisem.net>
99
;;
1010
;; Version: 2.4.0
11-
;; Package-Requires: ((emacs "24.4"))
11+
;; Package-Requires: ((emacs "24.4") (seq "2.3"))
1212
;; Keywords: languages swift
1313

1414
;; This file is not part of GNU Emacs.
@@ -48,6 +48,7 @@ Others includes enum, struct, class, protocol name.
4848
Set `match-data', and return t if a function name found before position LIMIT.
4949
Return nil otherwise."
5050
(and
51+
(< (point) limit)
5152
(re-search-forward "\\<\\(\\sw\\|\\s_\\)+\\>" limit t)
5253
(or
5354
(swift-mode:function-name-pos-p (match-beginning 0))

swift-mode-indent.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
;; Arthur Evstifeev <lod@pisem.net>
99
;;
1010
;; Version: 2.4.0
11-
;; Package-Requires: ((emacs "24.4"))
11+
;; Package-Requires: ((emacs "24.4") (seq "2.3"))
1212
;; Keywords: languages swift
1313

1414
;; This file is not part of GNU Emacs.

swift-mode-lexer.el

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
;; Arthur Evstifeev <lod@pisem.net>
99
;;
1010
;; Version: 2.4.0
11-
;; Package-Requires: ((emacs "24.4"))
11+
;; Package-Requires: ((emacs "24.4") (seq "2.3"))
1212
;; Keywords: languages swift
1313

1414
;; This file is not part of GNU Emacs.
@@ -250,6 +250,7 @@ stops where the level becomes zero."
250250
'("\"\"\"" "\"" "//" "/*" "(" ")")
251251
"\\|")))
252252
(while (and (not found-matching-parenthesis)
253+
(< (point) end)
253254
(search-forward-regexp pattern end t))
254255
(cond
255256
((equal "\"\"\"" (match-string-no-properties 0))
@@ -307,7 +308,9 @@ If the string go beyond END, stop there."
307308
Assuming the cursor is on a string.
308309
If the string go beyond END, stop there.
309310
The string should be terminated with QUOTATION."
310-
(if (search-forward-regexp (concat (regexp-quote quotation) "\\|(") end t)
311+
(if (and
312+
(< (point) end)
313+
(search-forward-regexp (concat (regexp-quote quotation) "\\|(") end t))
311314
(cond
312315
((and (equal quotation (match-string-no-properties 0))
313316
(not (swift-mode:escaped-p (match-beginning 0))))

swift-mode-repl.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
;; Arthur Evstifeev <lod@pisem.net>
99
;;
1010
;; Version: 2.4.0
11-
;; Package-Requires: ((emacs "24.4"))
11+
;; Package-Requires: ((emacs "24.4") (seq "2.3"))
1212
;; Keywords: languages swift
1313

1414
;; This file is not part of GNU Emacs.

swift-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
;; Arthur Evstifeev <lod@pisem.net>
99
;;
1010
;; Version: 2.4.0
11-
;; Package-Requires: ((emacs "24.4"))
11+
;; Package-Requires: ((emacs "24.4") (seq "2.3"))
1212
;; Keywords: languages swift
1313
;; URL: https://github.com/swift-emacs/swift-mode
1414

test/swift-mode-test-indent.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
;; Authors: taku0 (http://github.com/taku0)
66
;;
77
;; Version: 2.4.0
8-
;; Package-Requires: ((emacs "24.4"))
8+
;; Package-Requires: ((emacs "24.4") (seq "2.3"))
99
;; Keywords: languages swift
1010
;; URL: https://github.com/swift-emacs/swift-mode
1111

0 commit comments

Comments
 (0)